I am working on elasticsearch.
The thing is the method I am implementing takes in a mongosearch query but I need to execute it on elasticsearch.
so far the mongosearch query will contain the criterias based on which i need to look.
is there any way to execute a mongosearch query on es ? or some way to change it to es query ?
CodePudding user response:
Elasticsearch comes with its own DSL(Domain specific language), Hence MongoDB query will not work on the Elasticsearch, Although as Elasticsearch is built on top of Lucene, So for its query string it supports Lucene syntax. You can write your own converter to convert the mongoDB, although there are few failed attempts here and here..
If you like to use the advanced queries of Elasticsearch than writing your converter for those queries might be challanging.