Query_syntax operator should support lucene syntax
At the moment the query_syntax seems to have a custom syntax. It looks similar to lucene syntax but is not the same.
There are a few differences to azure and elastic and I don’t understand whether I am doing something wrong or not.
What all three service have in common is that they are built on top of lucene, therefore I though that the querystring operator uses the lucene query syntax as it seems to be done by elastic and azure: https://lucene.apache.org/core/29_4/queryparsersyntax.html
Documentation about the elastic query string query can be found under: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
There are a few thing that work differently:
- The Atlas query_string does not support fuzzy operator like helo~.
- The Atlas querystring cannot search in multiple fields, because “*” is not supported as a defaultpath.
- The Atlas query_string does not seem to support the lucene syntax at all.
This makes migration harder and the user cannot use the syntax. I got it working with a custom converter so it is technically possible, but it would be better if Atlas search would just support it:
https://github.com/SebastianStehle/MongoSearchTest/blob/main/Mongo.LuceneQuery/LuceneQueryVisitor.cs