lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Rochkind <rochk...@jhu.edu>
Subject RE: Query related question
Date Wed, 02 Jun 2010 02:52:38 GMT
One way to do it would be to use dismax request handler at query time, with a pf paramater
on the same field(s) as your qf paramter, but with a big boost on the pf.  http://wiki.apache.org/solr/DisMaxRequestHandler

I'm not sure why you're getting matches for "tigers" and "woods" on "tiger woods" though;
your example has the EnglishPorterFilterFactory commented out, if you had that actually in
there that would explain it but as it is, I'm not sure what does. Your synonyms file? That
seems odd. 

If you WERE using stemming, but wanted un-stemmed results to rank higher, one way to do it
would be to actually use two different solr fields, one stemmed and one not stemmed. And then
again use dismax, and boost the un-stemmed field higher, in either both qf and pf, or just
pf. 

Jonathan
________________________________________
From: iboppana [indrani.boppana@cmgdigital.com]
Sent: Tuesday, June 01, 2010 10:45 PM
To: solr-user@lucene.apache.org
Subject: Query related question

Hi All,

When I query for a word say Tiger woods, and sort results by score... i do
notice that the results are mixed up i.e first 5 results match Tiger woods
the next 2 match either tiger/tigers or wood/woods
the next 2 after that i notice again match tiger woods.

How do i make sure that when searching for words like above i get all the
results matching whole search term first, followed by individual tokens like
tiger, woods later.

My text fieldtype defined as follows

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <!--<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>-->
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <!--<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/> -->
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>



Thanks
 Indrani
--
View this message in context: http://lucene.472066.n3.nabble.com/Query-related-question-tp863523p863523.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message