lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Michael Engelke <thomas.enge...@posteo.de>
Subject Re: Questions regarding autosuggest (Solr 5.2.1)
Date Tue, 30 Jun 2015 08:17:06 GMT
 God damn. Thank you.

*ashamed*

Am 30.06.2015 00:21 schrieb Erick Erickson: 

> Try not putting it in double quotes?
> 
> Best,
> Erick
> 
> On Mon, Jun 29, 2015 at 12:22 PM, Thomas Michael Engelke
> <thomas.engelke@posteo.de> wrote:
> 
>> A friend and I are trying to develop some software using Solr in the background,
and with that comes alot of changes. We're used to older versions (4.3 and below). We especially
have problems with the autosuggest feature. This is the field definition (schema.xml) for
our autosuggest field: <field name="autosuggest" type="autosuggest" indexed="true" stored="true"
required="false" multiValued="true" /> ... <copyField source="name" dest="autosuggest"
/> ... <fieldType name="autosuggest" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter
class="solr.WordDelimiterFilterFactory" splitOnCaseChange="0" splitOnNumerics="1" generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="0" catenateAll="0" preserveOriginal="0"/>
<filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.StopFilterFactory"
words="stopwords.txt" ignoreCase="true" enablePositionIncrements="true"
format="snowball"/> <filter class="solr.DictionaryCompoundWordTokenFilterFactory" dictionary="dictionary.txt"
minWordSize="5" minSubwordSize="3" maxSubwordSize="30" onlyLongestMatch="false"/> <filter
class="solr.GermanNormalizationFilterFactory"/> <filter class="solr.SnowballPorterFilterFactory"
language="German2" protected="protwords.txt"/> <filter class="solr.EdgeNGramFilterFactory"
minGramSize="2" maxGramSize="30"/> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer> <analyzer type="query"> <tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory" splitOnCaseChange="0" splitOnNumerics="1"
generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="0" catenateAll="0"
preserveOriginal="0"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.StopFilterFactory"
words="stopwords.txt" ignoreCase="true" enablePositionIncrements="true" format="snowball"/>
<filter
class="solr.GermanNormalizationFilterFactory"/> <filter class="solr.SnowballPorterFilterFactory"
language="German2" protected="protwords.txt"/> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer> </fieldType> Afterwards, we defined an autosuggest component to use
this field, like this (solrconfig.xml): <searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester"> <str name="name">mySuggester</str> <str name="lookupImpl">FuzzyLookupFactory</str>
<str name="storeDir">suggester_fuzzy_dir</str> <str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">suggest</str> <str name="suggestAnalyzerFieldType">"autosuggest"</str>
<str name="buildOnStartup">false</str> <str name="buildOnCommit">false</str>
</lst> </searchComponent> And add a requesthandler to test out the functionality:
<requestHandler name="/suggesthandler" class="solr.SearchHandler" startup="lazy" > <lst
name="defaults"> <str name="suggest">true</str> <str
name="suggest.count">10</str> <str name="suggest.dictionary">mySuggester</str>
</lst> <arr name="components"> <str>suggest</str> </arr> </requestHandler>
However, trying to start the core that has this configuration, a long exception occurs, telling
us this: Error in configuration: "autosuggest" is not defined in the schema Now, that seems
to be wrong. Any idea how to fix that?
 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message