-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Text Search
-
None
-
ALL
-
Query 2017-10-23, Query 2017-11-13, Query 2017-12-04
I am using mongo db 3.2.8 on mac os. Here is a bug I'm facing when using language="none". My desired result was that when setting language="none", mongo DB will stop ignoring stopwords.
I have created a collection 'resources' with text index on a field called 'title' with default language (English.)
First, I create a document with title = 'What are you?'.
- When I search with db.getCollection('resources').find({$text:{$search: 'what are you?'}}) I get no results as expected because all the words are stopwords.
- When I search with
db.getCollection('resources').find({$text:{$search: 'what are you?'}}, $language:"none"), I still get no results. Ideally, I'd like this to return the document.
Now I modified the document to have title = 'Whats are you?' (notice the typo 'Whats')
- When I search with
db.getCollection('resources').find({$text:{$search: 'whats are you?'}}, $language:"none"), I do not get this document even though there is an exact match and 'whats' is presumably not a stopword! - When I search with
db.getCollection('resources').find({$text:{$search: 'what are you?'}}, $language:"none"), I get this document in return! - Language="en" is working fine: when I search with db.getCollection('resources').find({$text:{$search: 'whats are you?'}}) I get the result and when searching with db.getCollection('resources').find({$text:{$search: 'what are you?'}}), I don't.
- related to
-
SERVER-29918 stemming behavior for diacritics causes incorrect results
- Closed