@@ -21,7 +21,7 @@ dotnet add package WorkflowCore.Providers.Elasticsearch
21
21
22
22
Use the ` .UseElasticsearch ` extension method on ` IServiceCollection ` when building your service provider
23
23
24
- ``` C#
24
+ ```
25
25
using Nest;
26
26
...
27
27
services.AddWorkflow(cfg =>
@@ -50,7 +50,7 @@ This will do a full text search on the following default fields
50
50
51
51
In addition you can search data within your own custom data object if it implements ` ISearchable `
52
52
53
- ``` c#
53
+ ```
54
54
using WorkflowCore.Interfaces;
55
55
...
56
56
public class MyData : ISearchable
@@ -72,7 +72,7 @@ This will do a full text search on the following default fields
72
72
##### Examples
73
73
74
74
Search all fields for "puppies"
75
- ``` c#
75
+ ```
76
76
searchIndex.Search("puppies", 0, 10);
77
77
```
78
78
@@ -96,30 +96,30 @@ The following filter types are available
96
96
##### Examples
97
97
98
98
Filtering by reference
99
- ``` c#
99
+ ```
100
100
using WorkflowCore.Models.Search;
101
101
...
102
102
103
103
searchIndex.Search("", 0, 10, ScalarFilter.Equals(x => x.Reference, "My Reference"));
104
104
```
105
105
106
106
Filtering by workflows started after a date
107
- ``` c#
107
+ ```
108
108
searchIndex.Search("", 0, 10, DateRangeFilter.After(x => x.CreateTime, startDate));
109
109
```
110
110
111
111
Filtering by workflows completed within a period
112
- ``` c#
112
+ ```
113
113
searchIndex.Search("", 0, 10, DateRangeFilter.Between(x => x.CompleteTime, startDate, endDate));
114
114
```
115
115
116
116
Filtering by workflows in a state
117
- ``` c#
117
+ ```
118
118
searchIndex.Search("", 0, 10, StatusFilter.Equals(WorkflowStatus.Complete));
119
119
```
120
120
121
121
Filtering against your own custom data class
122
- ``` c#
122
+ ```
123
123
124
124
class MyData
125
125
{
0 commit comments