-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Make IntervalQuery available via the Query DSL #29636
Copy link
Copy link
Closed
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>featurerelease highlightv7.0.0
Description
Lucene 7.4 adds a new IntervalQuery, intended as a longer-term replacement for the Spans family. This should be available through the Query DSL.
The query looks something like this:
POST _search
{
"query": {
"intervals": {
"my_text": {
"all_of": {
"max_gaps": 1,
"ordered": true,
"intervals": [
{
"match": {
"query": "cold slimy porridge",
"analyzer": "",
"ordered": false,
"max_gaps": 1
}
},
{
"match": {
"query": "cold slimy porridge",
"analyzer": "",
"ordered": false,
"max_gaps": 1
}
}
],
"filter": {
"containing": {
"match": {
"query": "cold slimy porridge",
"analyzer": "",
"ordered": false,
"max_gaps": 1
}
}
}
}
}
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>featurerelease highlightv7.0.0
Type
Fields
Give feedbackNo fields configured for issues without a type.