You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Areek Zillur (JIRA)" <ji...@apache.org> on 2013/10/29 07:59:31 UTC

[jira] [Comment Edited] (SOLR-5378) Suggester Version 2

    [ https://issues.apache.org/jira/browse/SOLR-5378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13807731#comment-13807731 ] 

Areek Zillur edited comment on SOLR-5378 at 10/29/13 6:58 AM:
--------------------------------------------------------------

Uploaded Patch:
   - added documentation
   - added expressions dependency to Solr [needed by DocumentExpressionDictionaryFactory]
   - added SuggesterComponent tests
   - minor fixes all over

TODO:
   - add DistributedSuggesterComponent tests

Was wondering whether its worth it to have the onlyMorePopular option for the suggester. (default is false), when true the option sorts the suggestions alphabetically at the moment. It seems to me that this might not be very useful for suggestions (as there is no relation between lexicographic ordering and suggestion relevance). It makes sense to have the suggestions sorted by weights provided instead (default behavior). It is also to be noted that a lot of the new Lucene suggester rejects or ignores this option anyway, defaulting to sorting by weight instead (Analyzing, FuzzyAnalyzing rejects it and AnalyzingInfix ignores it).


was (Author: areek):
Uploaded Patch:
   - added documentation
   - added expressions dependency to Solr
   - added SuggesterComponent tests
   - minor fixes all over

TODO:
   - add DistributedSuggesterComponent tests

Was wondering whether its worth it to have the onlyMorePopular option for the suggester. (default is false), when true the option sorts the suggestions alphabetically at the moment. It seems to me that this might not be very useful for suggestions (as there is no relation between lexicographic ordering and suggestion relevance). It makes sense to have the suggestions sorted by weights provided instead (default behavior). It is also to be noted that a lot of the new Lucene suggester rejects or ignores this option anyway, defaulting to sorting by weight instead (Analyzing, FuzzyAnalyzing rejects it and AnalyzingInfix ignores it).

> Suggester Version 2
> -------------------
>
>                 Key: SOLR-5378
>                 URL: https://issues.apache.org/jira/browse/SOLR-5378
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Areek Zillur
>         Attachments: SOLR-5378.patch, SOLR-5378.patch, SOLR-5378.patch
>
>
> The idea is to add a new Suggester Component that will eventually replace the Suggester support through the SpellCheck Component.
> This will enable Solr to fully utilize the Lucene suggester module (along with supporting most of the existing features) in the following ways:
>    - Dictionary pluggability (give users the option to choose the dictionary implementation to use for their suggesters to consume)
>    - Map the suggester options/ suggester result format (e.g. support for payload)
>    - The new Component will also allow us to have "beefier" Lookup support instead of resorting to collation and such. (Move computation from query time to index time) with more freedom
> In addition to this, this suggester version should also have support for distributed support, which was awkward at best with the previous implementation due to SpellCheck requirements.
> Example query:
> {code}
> http://localhost:8983/solr/suggest?suggest.dictionary=mySuggester&suggest=true&suggest.build=true&suggest.q=elec
> {code}
> Distributed query:
> {code}
> http://localhost:7574/solr/suggest?suggest.dictionary=mySuggester&suggest=true&suggest.build=true&suggest.q=elec&shards=localhost:8983/solr,localhost:7574/solr&shards.qt=/suggest
> {code}
> Example Response:
> {code}
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">28</int>
> </lst>
> <str name="command">build</str>
> <result name="response" numFound="0" start="0" maxScore="0.0"/>
> <lst name="suggest">
> <lst name="suggestions">
> <lst name="e">
> <int name="numFound">3</int>
> <lst name="suggestion">
> <str name="term">electronics and computer1</str>
> <long name="weight">2199</long>
> <str name="payload"/>
> </lst>
> <lst name="suggestion">
> <str name="term">electronics</str>
> <long name="weight">649</long>
> <str name="payload"/>
> </lst>
> <lst name="suggestion">
> <str name="term">electronics</str>
> <long name="weight">649</long>
> <str name="payload"/>
> </lst>
> </lst>
> </lst>
> </lst>
> </response>
> {code}
> Example config file:
> {code}
>   <searchComponent name="suggest" class="solr.SuggestComponent">
>   	<lst name="suggester">
>       <str name="name">mySuggester</str>
>       <str name="lookupImpl">FuzzyLookupFactory</str> 
>       <str name="dictionaryImpl">DocumentDictionaryFactory</str> 
>       <str name="field">cat</str>
>       <str name="weightField">price</str>
>       <str name="suggestAnalyzerFieldType">string</str>
>     </lst>
>   </searchComponent>
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org