lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: using lucene parser syntax with eDisMax
Date Fri, 15 Jul 2016 20:42:40 GMT
Yes on both counts. Although it takes a bit of practice, if you add
&debug=query to the query you'll see a section of the
response showing you exactly what the resulting query is after
all the rules are applied.


On Fri, Jul 15, 2016 at 12:32 PM, Whelan, Andy <> wrote:
> Hello,
> I am using the eDisMax parser and have the following question.
> With the eDisMax parser we can pass a query, q="brown and mazda",  and configure a bunch
of fields in a solrconfig.xml SearchHandler to query on as "qf". Let's say I have a SOLR schema.xml
with the following fields:
> <field name="color" type="text_general" indexed="true" stored="true"/>
> <field name="brand" type="text_general" indexed="true" stored="true"/>
> and the following request handler in solrconfig.xml:
> <requestHandler name="/select" class="solr.SearchHandler" default="true">
>         <lst name="defaults">
>             <str name="defType">edismax</str>
>             <str name="qf">color brand</str>
>      </lst>
> </ requestHandler>
> This makes boosting very easy.  I can execute a query "q=brown^2.0 and mazda^3.0") against
the query handler "/select" above without specifying fields in the query string.  I can do
this without having to copy color and brand to a specific catch all field as I would with
the "lucene" parser (which would be configured as the default field "df").
> The documentation at
says that eDisMax "supports the full Lucene query parser syntax".
> Does this mean that a query string "color:brown^2 and mazda" is legal with eDisMax too?
 Notice that I am specifying the color field in the query (lucene parser syntax). If the answer
is yes, does this mean that "brown" is only filtered against the color field and mazda will
be filtered against both the color field and the brand field?
> Thanks!

View raw message