Nitin,

My guess here is that your spellcheck field is a field that has stemming.  This 
might be why you get a collation that return "wind" even though the user 
queried "wnd" and it does not get any suggestions.  Perhaps "wnd" is stemmed 
the same as "wind" ?  (Spellcheck usually works best if you "copyField" the 
query field to something that is tokenized but not heavily analyzed, and use 
the copy as the spellcheck dictionary.)

The other problem might be because "wind" is in the index but you are not using 
"spellcheck.alternativeTermCount".  If you set this to the same value as 
"spellcheck.count", then it will give suggestions even when words exist in the 
index.

By "hits", it means if you replaced the "q" parameter on the original query but 
left everything else the same (filters, etc), this is how many results you 
would get.

If you need more help, please include in your message the pertinent sections of 
solrconfig.xml, schema.xml and also the full query url you are using and the 
full spellcheck response.

James Dyer
Ingram Content Group


-----Original Message-----
From: Nitin Solanki [mailto:nitinml...@gmail.com] 
Sent: Monday, February 09, 2015 7:47 AM
To: solr-user@lucene.apache.org
Subject: Collations are not working fine.

I am working on spell checking in Solr. I have implemented Suggestions and
collations in my spell checker component.

Most of the time collations work fine but in few case it fails.

*Working*:
I tried query:*gone wthh thes wnd*: In this "wnd" doesn't give suggestion
"wind" but collation is coming right = "gone with the wind", hits = 117


*Not working:*
But when I tried query: *gone wthh thes wint*: In this "wint" does give
suggestion "wind" but collation is not coming right. Instead of gone with
the wind it gives gone with the west, hits = 1.

And I want to also know what is *hits* in collations.

Reply via email to