Hi,
I'd like to clarify our use case a bit more.

We want to return the exact search query as a suggestion only if it is
present in the index. So in my example we would expect to get the
suggestion "foo" for the query "foo" but no suggestion "abc" for the query
"abc" (because "abc" is not in the dictionary).

For me this use case seems quite common. Say, we have three products in our
store: "foo", "foo 1", "foo 2". If the user types "foo" in the product
search, we want to suggest all our products in the dropdown.

Is this something we can do with the Solr suggester?
Mirko


2013/11/20 Developer <bbar...@gmail.com>

> May be there is a way to do this but it doesn't make sense to return the
> same
> search query as a suggestion (Search query is not a suggestion as it might
> or might not be present in the index).
>
> AFAIK you can use various look up algorithm to get the suggestion list and
> they lookup the terms based on the query value (some alogrithm implements
> fuzzy logic too). so searching Foo will return FooBar, Foo2 but not foo.
>
> You should fetch the suggestion only if the numfound is greater than 0 else
> you don't have any suggestion.
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Suggester-how-to-return-exact-match-tp4102203p4102259.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to