Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is solr's default query parser

i am confused by these words in the solr document:

https://cwiki.apache.org/confluence/display/solr/The+Standard+Query+Parser

Before Solr 1.3, the Standard Request Handler called the standard query parser as the default query parser. In versions since Solr 1.3, the Standard Request Handler calls the DisMax query parser as the default query parser.

https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser

The q parameter does not support wildcard characters such as *.

so i download solr 4.7.2, unzip it

checking that i have

  <requestHandler name="/select" class="solr.SearchHandler">

in solr-4.7.2/example/solr/collection1/conf/solrconfig.xml, by default.

then, i index this document

<?xml version="1.0"?>
<add>
  <doc boost="1.0">
        <field name="id">item1</field>
    </doc>
</add>

but

http://localhost:8983/solr/collection1/select?q=id:it*

finds the document,

http://localhost:8983/solr/collection1/select?q=id:it*defType=dismax

finds no item

so looks like standard query parser is the default instead of the dismax query parser?

like image 855
otm Avatar asked Jun 06 '26 09:06

otm


1 Answers

The default is defined in your solrconfig.xml file. The default solrconfig.xml file that comes with 4.7.2 has the following entry:

edismax

This means that the default is the extended dismax query parser. http://wiki.apache.org/solr/ExtendedDisMax

like image 196
John Petrone Avatar answered Jun 08 '26 22:06

John Petrone



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!