2
Hello I am new in this database and I have made the following index for my documents:
produtos.create_index([('Tags', pymongo.TEXT)], unique=False, sparse=True,name='tags', default_language='portuguese')
then command a find()
db.getCollection('produtos').find({$text:{$search:'cama'}})
And it returns me a lot of smartphones as for example one with these tags:
"Tags" : [
"iphone",
"64gb",
"dourado",
"tela",
"4.7",
"ios",
"4g",
"câmera",
"12mp",
"apple"
],
The only esoteric explanation I found is the "camera". I deleted the "Camera" but the "Cam" are also being returned. Does he search for chars instead of words? I tried the 'Galax' and did not return any "Sansumg Galaxy". But 'ga' returns motherboards like "Gigabytes', 'lga' ... I’m lost in this.
In fact in the hasty reading at the beginning of the documentation this there "perform a text search of string content". But I still wonder why 'camera' came if 'bed' are different. However this already solved. Thanks.
– Fabio