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 bbi123 <bb...@gmail.com> on 2014/02/19 01:07:31 UTC

SOLR Suggester - return matched suggestion along with other suggestions

Hi,

Is there a way to make suggester return the matched suggestion too?

http://localhost:8983/solr/core1/suggest?q=name:iphone

The above query should return 
*iphone *
iphone5c 
iphone4g

Currently it returns only
iphone5c 
iphone4g


I can use edge N gram filter to implement the above feature but not sure how
to achieve it when using suggester.



--
View this message in context: http://lucene.472066.n3.nabble.com/SOLR-Suggester-return-matched-suggestion-along-with-other-suggestions-tp4118132.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SOLR Suggester - return matched suggestion along with other suggestions

Posted by bbi123 <bb...@gmail.com>.
Nevermind, I added a space to the end of all the field values (keywords)
supplied to suggester and it works!!!

iphone is indexed as iphone (with additional space at the end)

I trim the value passed to the search after selection the keyword from
dropdown suggestion so it will be again passed as iphone(without space) when
querying SOLR.



--
View this message in context: http://lucene.472066.n3.nabble.com/SOLR-Suggester-return-matched-suggestion-along-with-other-suggestions-tp4118132p4118137.html
Sent from the Solr - User mailing list archive at Nabble.com.