Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Atlas Search
Created by Guest
Created on Nov 11, 2021

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 query_string operator uses the lucene query syntax as it seems to be done by elastic and azure: https://lucene.apache.org/core/2_9_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: 1. The Atlas query_string does not support fuzzy operator like helo~. 2. The Atlas query_string cannot search in multiple fields, because “*” is not supported as a default_path. 3. 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