Skip to content

Commit cb6c290

Browse files
authored
Update elastic-search.md
1 parent c1e54cf commit cb6c290

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/elastic-search.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dotnet add package WorkflowCore.Providers.Elasticsearch
2121

2222
Use the `.UseElasticsearch` extension method on `IServiceCollection` when building your service provider
2323

24-
```C#
24+
```
2525
using Nest;
2626
...
2727
services.AddWorkflow(cfg =>
@@ -50,7 +50,7 @@ This will do a full text search on the following default fields
5050

5151
In addition you can search data within your own custom data object if it implements `ISearchable`
5252

53-
```c#
53+
```
5454
using WorkflowCore.Interfaces;
5555
...
5656
public class MyData : ISearchable
@@ -72,7 +72,7 @@ This will do a full text search on the following default fields
7272
##### Examples
7373

7474
Search all fields for "puppies"
75-
```c#
75+
```
7676
searchIndex.Search("puppies", 0, 10);
7777
```
7878

@@ -96,30 +96,30 @@ The following filter types are available
9696
##### Examples
9797

9898
Filtering by reference
99-
```c#
99+
```
100100
using WorkflowCore.Models.Search;
101101
...
102102
103103
searchIndex.Search("", 0, 10, ScalarFilter.Equals(x => x.Reference, "My Reference"));
104104
```
105105

106106
Filtering by workflows started after a date
107-
```c#
107+
```
108108
searchIndex.Search("", 0, 10, DateRangeFilter.After(x => x.CreateTime, startDate));
109109
```
110110

111111
Filtering by workflows completed within a period
112-
```c#
112+
```
113113
searchIndex.Search("", 0, 10, DateRangeFilter.Between(x => x.CompleteTime, startDate, endDate));
114114
```
115115

116116
Filtering by workflows in a state
117-
```c#
117+
```
118118
searchIndex.Search("", 0, 10, StatusFilter.Equals(WorkflowStatus.Complete));
119119
```
120120

121121
Filtering against your own custom data class
122-
```c#
122+
```
123123
124124
class MyData
125125
{

0 commit comments

Comments
 (0)