-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
-
ALL
-
QI 2023-05-29, QI 2023-06-12
Hello ,
I think i have found a bug with $text command which is used to invoke the text indexes. The command fails when we are trying to search for multiple phrases and use an OR condition. for example:
find({'$text':{'$search':'\"\"works at company1\" \"Adam\" \"'}})
This command tokenizes the first phrase and gets documents having 'works' keyword OR 'company1' keyword OR 'Adam' keyword. which is not what we want. We want the command to get 'works at walee' phrase which is not what the command does.
the AND command:
find({'$text':{'$search':'\"works at company1\" \"Adam\" '}})
works fine and only gets documents which has both the phrase and the keyword doing exact phrase matching .
- is related to
-
SERVER-76174 $text OR condition on phrases not working
- Closed
-
SERVER-76175 $text OR condition on phrases not working
- Closed
- related to
-
SERVER-61259 $or queries with text indexes fail on clustered collections
- Closed