0
EVE可以使用文本搜索吗?它在mongo https://docs.mongodb.com/v3.2/text-search/上实现,但我无法在EVE上运行它。使用mongo文本索引可以使用EVE进行文本搜索吗?
即
find({ $text: { $search: "java \"coffee shop\"" } })
EVE可以使用文本搜索吗?它在mongo https://docs.mongodb.com/v3.2/text-search/上实现,但我无法在EVE上运行它。使用mongo文本索引可以使用EVE进行文本搜索吗?
即
find({ $text: { $search: "java \"coffee shop\"" } })
是,该指数必须创建
例如(在settings.py)之前:
'mongo_indexes' : {'text': ([('names.keyword', "text")])}
然后
localhost:5000/api/images?where={"$text": {"$search": "food dog"}}
中当然你也可以从mongo shell建立索引。然而,对于'mongo_indexes',Eve会在启动时创建索引(如果缺失),这很方便,并确保您始终在正确索引的数据库上运行。 –