-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
SearchSearch query, autocomplete ...etcSearch query, autocomplete ...etcbugSomething isn't workingSomething isn't workinglucene
Description
Describe the bug
The COMPLEMENT value in RegexpFlag is not working. The code refers to deprecated complement in Lucene https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/index/query/RegexpFlag.java#L66. See related Lucene pull apache/lucene#13739.
Related component
No response
To Reproduce
When documenting regex syntax, I ran the following example to test the COMPLEMENT value of the flags parameter:
PUT /test/_doc/1
{
"text": "abc"
}
PUT /test/_doc/2
{
"text": "adc"
}
PUT /test/_doc/3
{
"text": "acc"
}
GET /test/_search
{
"query": {
"regexp": {
"text.keyword": {
"value": "a~bc",
"flags": "COMPLEMENT"
}
}
}
}
The query returns no results.
Expected behavior
I'm expecting adc and acc to be returned.
Additional Details
OpenSearch 3.0
Metadata
Metadata
Assignees
Labels
SearchSearch query, autocomplete ...etcSearch query, autocomplete ...etcbugSomething isn't workingSomething isn't workinglucene
Type
Projects
Status
🆕 New