Right, this is what the suggester you're using is built for. Which is
actually way cool for certain situations.

Try the FreeTextLookupFactory (warning, I'm not too familiar with the
nuances here)

Or maybe spelling suggestions are more what you're looking for which
look at the terms and
return a term at a time.

Best,
Erick

On Wed, Apr 22, 2015 at 7:59 AM, LAFK <tomasz.bo...@gmail.com> wrote:
> For the sake of others who would look for the solution and stumble upon this 
> thread, consider sharing.
>
> I'd expect Solr to return whole field, if it's a text block then that's it.
>
> @LAFK_PL
>   Oryginalna wiadomość
> Od: Martin Keller
> Wysłano: środa, 22 kwietnia 2015 16:36
> Do: solr-user@lucene.apache.org
> Odpowiedz: solr-user@lucene.apache.org
> Temat: Re: Suggester
>
> OK, I found the problem and as so often it was sitting in front of the 
> display.
>
> Now the next problem:
> The suggestions returned consist always of a complete text block where the 
> match was found. I would have expected a single word or a small phrase.
>
> Thanks in advance
> Martin
>
>
>> Am 22.04.2015 um 12:50 schrieb Martin Keller 
>> <martin.kel...@unitedplanet.com>:
>>
>> 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 <erickerick...@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.kel...@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
>>>>
>>
>

Reply via email to