You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Indika Tantrigoda <in...@gmail.com> on 2012/02/16 18:07:59 UTC

Solr edismax clarification

Hi All,

I am using edismax SearchHandler in my search and I have some issues in the
search results. As I understand if the "defaultOperator" is set to OR the
search query will be passed as  -> The OR quick OR brown OR fox implicitly.
However if I search for The quick brown fox, I get lesser results than
explicitly adding the OR. Another issue is that if I search for The quick
brown fox other documents that contain the word fox is not in the search
results.

Thanks.

Re: Solr edismax clarification

Posted by Indika Tantrigoda <in...@gmail.com>.
Hi,
Thanks for the response.

Below is the field type and schema definition.

 <fieldType name="text_html" class="solr.TextField"
positionIncrementGap="100">
          <analyzer type="index">
              <charFilter class="solr.HTMLStripCharFilterFactory"/>
              <tokenizer class="solr.WhitespaceTokenizerFactory"/>
              <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords_en.txt" enablePositionIncrements="true" />
              <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
                      catenateNumbers="1" catenateAll="0"
splitOnCaseChange="1" preserveOriginal="1"/>
              <filter class="solr.LowerCaseFilterFactory"/>
          </analyzer>
          <analyzer type="query">
              <tokenizer class="solr.WhitespaceTokenizerFactory"/>
              <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords_en.txt" enablePositionIncrements="true"/>
              <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
                      catenateNumbers="0" catenateAll="0"
splitOnCaseChange="1" preserveOriginal="1"/>
              <filter class="solr.LowerCaseFilterFactory"/>
          </analyzer>
      </fieldType>

   <field name="title" type="text_html" indexed="true" stored="true"
multiValued="false" required="false"/>

This is the request handler.

<requestHandler name="general_search" class="solr.SearchHandler" >
    <lst name="defaults">
     <str name="defType">edismax</str>
     <str name="echoParams">explicit</str>
     <str name="q.alt">*:*</str>
     <float name="tie">0.01</float>
     <str name="qf">
    title^2 description^1.0
     </str>
     <str name="boost">pow(100,boost_factor)</str>
    </lst>
</requestHandler>

Here is the output from debugQuery=on

BoostedQuery(boost(+(((title:boston^2.0 | description:boston)~0.01
(title:public^2.0 | description:public)~0.01 (title:library^2.0 |
description:library)~0.01)~3),pow(const(100.0),int(boost_factor))))

stopwords_en.txt is inlcuded for stopworods. i.e. the list of stopwords
that come with Solr.

The full query string is
http://localhost:8888/solr/select/?fl=title&rows=13&qt=general_search&q=boston+public+library&start=0&debugQuery=on

I use SolrJ in my application to connect to Solr.

As per the query string shown above if I search for Boston public library I
do not get a document that has the title Boston.

Thanks.

On 17 February 2012 15:55, O. Klein <kl...@octoweb.nl> wrote:

>
> Indika Tantrigoda wrote
> >
> > Hi All,
> >
> > I am using edismax SearchHandler in my search and I have some issues in
> > the
> > search results. As I understand if the "defaultOperator" is set to OR the
> > search query will be passed as  -> The OR quick OR brown OR fox
> > implicitly.
> >
> >
>
> Did you also remove "mm"? If not  "defaultOperator" is ignored and it
> follows "mm" settings.
>
> http://wiki.apache.org/solr/DisMaxQParserPlugin#mm_.28Minimum_.27Should.27_Match.29
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-edismax-clarification-tp3751013p3753260.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Solr edismax clarification

Posted by "O. Klein" <kl...@octoweb.nl>.
Indika Tantrigoda wrote
> 
> Hi All,
> 
> I am using edismax SearchHandler in my search and I have some issues in
> the
> search results. As I understand if the "defaultOperator" is set to OR the
> search query will be passed as  -> The OR quick OR brown OR fox
> implicitly.
> 
> 

Did you also remove "mm"? If not  "defaultOperator" is ignored and it
follows "mm" settings.
http://wiki.apache.org/solr/DisMaxQParserPlugin#mm_.28Minimum_.27Should.27_Match.29

--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-edismax-clarification-tp3751013p3753260.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr edismax clarification

Posted by Jan Høydahl <ja...@cominvent.com>.
Please provide your full query, including your "qf" parameter and all other request parameters, and also the relevant fields/field-types from schema. Do you use stopwords? Can you also add "debugQuery=true" and paste in the parsedQuery?

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 16. feb. 2012, at 18:07, Indika Tantrigoda wrote:

> Hi All,
> 
> I am using edismax SearchHandler in my search and I have some issues in the
> search results. As I understand if the "defaultOperator" is set to OR the
> search query will be passed as  -> The OR quick OR brown OR fox implicitly.
> However if I search for The quick brown fox, I get lesser results than
> explicitly adding the OR. Another issue is that if I search for The quick
> brown fox other documents that contain the word fox is not in the search
> results.
> 
> Thanks.