lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Benedetti <abenede...@apache.org>
Subject Re: Issue with Auto Suggester Component
Date Tue, 15 Mar 2016 09:33:35 GMT
Hi Manohar,
I have not clear what should be your ideal ranking of suggestions.

"I want prefix search of
entire keyword to be of high preference (#1 to #5 in the below example)
followed by prefix part of any other string (the last 2 in the below
example). I am not bothered about ordering within 1st and 2nd set.

ABC Corporation
ABCD Corporation
Abc Tech
AbCorporation
ABCD company
The ABC Company
The ABCDEF"

Could you take the example you posted, show an example of query and the
expected sort order ?
According to your description of the problem
Query : abc
1 Criteria : entire keyword to be of high preference
I can't understand why you didn't count #3, #6 but you did #5 .

2 Criteria : followed by prefix part of any other string
It is not that clear, probably you mean all the rest.
Anyway an infix lookup algorithm with a boost for exact search should do
the trick.

Please give us some more details !

Cheers

On Tue, Mar 15, 2016 at 8:19 AM, Manohar Sripada <manohar211@gmail.com>
wrote:

> Consider the below company names indexed. I want the below auto suggestions
> to be listed when searched for "abc". Basically, I want prefix search of
> entire keyword to be of high preference (#1 to #5 in the below example)
> followed by prefix part of any other string (the last 2 in the below
> example). I am not bothered about ordering within 1st and 2nd set.
>
> ABC Corporation
> ABCD Corporation
> Abc Tech
> AbCorporation
> ABCD company
> The ABC Company
> The ABCDEF
>
> I am using Suggest feature of solr as mentioned in the wiki
> <https://cwiki.apache.org/confluence/display/solr/Suggester>. I used
> different Lookup implementations available, but, I couldn't get the result
> as above. Here's is one sample config I used with BlendedInfixLookupFactory
>
>
>              *<lst name="suggester">*
> * <str name="name">businessNameBlendedInfixSuggester1</str>*
> * <str name="lookupImpl">BlendedInfixLookupFactory</str>*
> * <str name="dictionaryImpl">DocumentDictionaryFactory</str>*
> * <str name="field">business_name_suggest</str>*
> * <str name="payloadField">id</str>*
> *<str name="suggestAnalyzerFieldType">text_suggest</str>*
> * <str name="sortField">business_name</str>*
> * <str name="blenderType">linear</str>*
> * <str name="exactMatchFirst">true</str>*
> * <str name="indexPath">/app/solrnode/suggest_test_1_blendedinfix1</str>*
> * <str name="minPrefixChars">0</str>*
> * <str name="buildOnCommit">true</str>*
> * <str name="buildOnOptimize">true</str>*
> * <str name="highlight">false</str>*
> * </lst>*
>
> Can someone please suggest on how I can achieve this?
>
> Thanks,
> Manohar
>



-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message