lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Keller <martin.kel...@unitedplanet.com>
Subject Re: Suggester
Date Wed, 22 Apr 2015 10:50:19 GMT
Unfortunately, setting suggestAnalyzerFieldType to "text_suggest" didn’t change anything.
The suggest dictionary is freshly built.
As I mentioned before, only words or phrases of the source field „content“ are not matched.
When querying the index, the response only contains „suggestions“ field data not coming
from the „content“ field.
The complete schema is a slightly modified techproducts schema.
„Normal“ searching for words which I would expect coming from „content“ works.

Any more ideas?

Thanks 
Martin


> Am 21.04.2015 um 17:39 schrieb Erick Erickson <erickerickson@gmail.com>:
> 
> Did you build your suggest dictionary after indexing? Kind of a shot in the
> dark but worth a try.
> 
> Note that the suggest field of your suggester isn't using your "text_suggest"
> field type to make suggestions, it's using "text_general". IOW, the text may
> not be analyzed as you expect.
> 
> Best,
> Erick
> 
> On Tue, Apr 21, 2015 at 7:16 AM, Martin Keller
> <martin.keller@unitedplanet.com> wrote:
>> Hello together,
>> 
>> I have some problems with the Solr 5.1.0 suggester.
>> I followed the instructions in https://cwiki.apache.org/confluence/display/solr/Suggester
and also tried the techproducts example delivered with the binary package, which is working
well.
>> 
>> I added a field suggestions-Field to the schema:
>> 
>> <field name="suggestions" type="text_suggest" indexed="true" stored="true" multiValued="true“/>
>> 
>> 
>> And added some copies to the field:
>> 
>> <copyField source="content" dest="suggestions"/>
>> <copyField source="title" dest="suggestions"/>
>> <copyField source="author" dest="suggestions"/>
>> <copyField source="description" dest="suggestions"/>
>> <copyField source="keywords" dest="suggestions"/>
>> 
>> 
>> The field type definition for „text_suggest“ is pretty simple:
>> 
>> <fieldType name="text_suggest" class="solr.TextField" positionIncrementGap="100">
>>    <analyzer>
>>        <tokenizer class="solr.StandardTokenizerFactory"/>
>>        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"
/>
>>        <filter class="solr.LowerCaseFilterFactory"/>
>>    </analyzer>
>> </fieldType>
>> 
>> 
>> I Also changed the solrconfig.xml to use the suggestions field:
>> 
>> <searchComponent class="solr.SuggestComponent" name="suggest">
>>  <lst name="suggester">
>>    <str name="name">mySuggester</str>
>>    <str name="lookupImpl">FuzzyLookupFactory</str>
>>    <str name="dictionaryImpl">DocumentDictionaryFactory</str>
>>    <str name="field">suggestions</str>
>>    <str name="suggestAnalyzerFieldType">text_general</str>
>>    <str name="buildOnStartup">false</str>
>>  </lst>
>> </searchComponent>
>> 
>> 
>> For Tokens original coming from „title" or „author“, I get suggestions, but
not any from the content field.
>> So, what do I have to do?
>> 
>> Any help is appreciated.
>> 
>> 
>> Martin
>> 

Mime
View raw message