Perhaps Solr could adopt Elastic's Java QueryBuilder API, more or
less?: 
https://artifacts.elastic.co/javadoc/co/elastic/clients/elasticsearch-java/8.15.0/co/elastic/clients/elasticsearch/_types/query_dsl/package-summary.html
Is this what you referred to?  It needs an example (like what you
shared for your builder), which I didn't find.  First iteration could
be a minimal useful subset that grows as people have the inclination
to do so.  Of course Elastic's outputs Elastic JSON; we'd probably do
Solr's "lucene" syntax with local-params when needed.  Solr Query DSL
is an option but (A) I think most users would prefer something more
compact & simple for the basic use-cases, and (B) the JSON query DSL
can only be used in a couple places; there is no QParser for it
(although there could/should be one easily).

> What is the proper domain name for:
> title:"pink panther"

In Lucene-speak, this is a PhraseQuery.  Although a query parser will
usually run the query analysis chain on it, which can produce
different or additional terms that will show up in the actual
PhraseQuery.  Lucene's QueryBuilder will do this.  I imagine a SolrJ
QueryBuilder would/could have a .fieldQuery(fieldName,foobar) and the
phrase vs single term matter is a detail in the output based on
whether the foobar value has spaces or not (here it didn't).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@solr.apache.org
For additional commands, e-mail: dev-h...@solr.apache.org

Reply via email to