If you are using dismax/edismax with mm=0 (or some other low number), you 
should override this in the spellchecker.  Specify 
"spellcheck.collateParam.mm=100%", or something high like that.  Likewise if 
you're using the default lucene/solr query parser with q.op=OR, then you can 
specify "spellcheck.collateParam.q.op=AND" .  In either case this will require 
that every term in the collations are required for hit-checking purposes.  See 
http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.collateParam.XX

Does this solve your issue?

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: skmirch [mailto:skmi...@hotmail.com] 
Sent: Wednesday, April 03, 2013 6:37 PM
To: solr-user@lucene.apache.org
Subject: RE: Solr Multiword Search

The following query is doing a word search (based on my previous post)...

solr/spell?q=(charles+and+the+choclit+factory+OR+(title2:("charles+and+the+choclit+factory")))&spellcheck.collate=true&spellcheck=true&spellcheck.q=charles+and+the+choclit+factory
 

It produces a lot of unwanted matches.


In order to do a phrase search, I changed it to:
solr/spell?q=("charles+and+the+choclit+factory"+OR+(title2:("charles+and+the+choclit+factory")))&spellcheck.collate=true&spellcheck=true&spellcheck.q=charles+and+the+choclit+factory
 

It does not find any match for the words in the phrase I am looking for and
does poorly in the suggested collations.  I want phrase corrections.  How do
I achieve this?

"charles and the chocolit factory"
produces the following collations:
    <bool name="correctlySpelled">false</bool>
    <lst name="collation">
      <str name="collationQuery">charles and the chocolat factory</str>
      <int name="hits">2849777</int>
      <lst name="misspellingsAndCorrections">
        <str name="charles">charles</str>
        <str name="and">and</str>
        <str name="the">the</str>
        <str name="chocolit">chocolat</str>
        <str name="factory">factory</str>
      </lst>
    </lst>
    <lst name="collation">
      <str name="collationQuery">charles and the chocalit factory</str>
      <int name="hits">2849464</int>
      <lst name="misspellingsAndCorrections">
        <str name="charles">charles</str>
        <str name="and">and</str>
        <str name="the">the</str>
        <str name="chocolit">chocalit</str>
        <str name="factory">factory</str>
      </lst>
    </lst>
    <lst name="collation">
      <str name="collationQuery">charles and the chocolat factors</str>
      <int name="hits">2841190</int>
      <lst name="misspellingsAndCorrections">
        <str name="charles">charles</str>
        <str name="and">and</str>
        <str name="the">the</str>
        <str name="chocolit">chocolat</str>
        <str name="factory">factors</str>
      </lst>
    </lst>
    <lst name="collation">
      <str name="collationQuery">charley and the chocolat factory</str>
      <int name="hits">2827908</int>
      <lst name="misspellingsAndCorrections">
        <str name="charles">charley</str>
        <str name="and">and</str>
        <str name="the">the</str>
        <str name="chocolit">chocolat</str>
        <str name="factory">factory</str>
      </lst>
    </lst>
    <lst name="collation">
      <str name="collationQuery">charles and the chocalit factors</str>
      <int name="hits">2840877</int>
      <lst name="misspellingsAndCorrections">
        <str name="charles">charles</str>
        <str name="and">and</str>
        <str name="the">the</str>
        <str name="chocolit">chocalit</str>
        <str name="factory">factors</str>
      </lst>
    </lst>
    <lst name="collation">
      <str name="collationQuery">charles and the chocklit factory</str>
      <int name="hits">2849464</int>
      <lst name="misspellingsAndCorrections">
        <str name="charles">charles</str>
        <str name="and">and</str>
        <str name="the">the</str>
        <str name="chocolit">chocklit</str>
        <str name="factory">factory</str>
      </lst>
    </lst>
    <lst name="collation">
      <str name="collationQuery">charles and the chocolat factorz</str>
      <int name="hits">2841173</int>
      <lst name="misspellingsAndCorrections">
        <str name="charles">charles</str>
        <str name="and">and</str>
        <str name="the">the</str>
        <str name="chocolit">chocolat</str>
        <str name="factory">factorz</str>
      </lst>
    </lst>
    <lst name="collation">
      <str name="collationQuery">charley and the chocalit factory</str>
      <int name="hits">2827595</int>
      <lst name="misspellingsAndCorrections">
        <str name="charles">charley</str>
        <str name="and">and</str>
        <str name="the">the</str>
        <str name="chocolit">chocalit</str>
        <str name="factory">factory</str>
      </lst>
    </lst>
    <lst name="collation">
      <str name="collationQuery">charley and the chocolat factors</str>
      <int name="hits">2819321</int>
      <lst name="misspellingsAndCorrections">
        <str name="charles">charley</str>
        <str name="and">and</str>
        <str name="the">the</str>
        <str name="chocolit">chocolat</str>
        <str name="factory">factors</str>
      </lst>
    </lst>
    <lst name="collation">
      <str name="collationQuery">charlies and the chocolat factory</str>
      <int name="hits">2826661</int>
      <lst name="misspellingsAndCorrections">
        <str name="charles">charlies</str>
        <str name="and">and</str>
        <str name="the">the</str>
        <str name="chocolit">chocolat</str>
        <str name="factory">factory</str>
      </lst>
    </lst>
  </lst>

Notice number of hits.  This does not look right?  Please help.

Thanks.
-- Sandeep



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


Reply via email to