Hi Guys

I am having difficulties running a suggest Search Handler in a solrcloud
environment. The configuration was tested on a standalone machine and works
fine there. 

Here is my configuration:

*Schema.xml*

<field name="suggest" type="suggest_text" indexed="true" stored="false"
multiValued="true" />

<copyField source="field1" dest="suggest" />
<copyField source="field2" dest="suggest" />
<copyField source="field3" dest="suggest" />
...

<fieldType name="suggest_text" class="solr.TextField"
positionIncrementGap="100" autoGeneratePhraseQueries="true">
        <analyzer type="index">
                <tokenizer class="solr.KeywordTokenizerFactory" />
                <filter class="solr.SynonymFilterFactory"
                        synonyms="synonym.txt"
                        ignoreCase="true"
                        expand="true" />
                <filter class="solr.StopFilterFactory"
                        ignoreCase="true"
                        words="stopword.txt"
                        enablePositionIncrements="true" />
                <filter class="solr.LowerCaseFilterFactory" />
                <filter class="solr.KeywordMarkerFilterFactory" 
protected="protword.txt"
/>
        </analyzer>
        <analyzer type="query">
                <tokenizer class="solr.KeywordTokenizerFactory" />
                <filter class="solr.StopFilterFactory"
                        ignoreCase="true"
                        words="stopword.txt"
                        enablePositionIncrements="true" />
                <filter class="solr.LowerCaseFilterFactory" />
                <filter class="solr.KeywordMarkerFilterFactory" 
protected="protword.txt"
/>
        </analyzer>
</fieldType>


*Solrconfig.xml*

<searchComponent class="solr.SpellCheckComponent" name="suggest">
        <str name="queryAnalyzerFieldType">suggest_text</str>
        <lst name="spellchecker">
                <str name="name">suggest</str>
                <str 
name="classname">org.apache.solr.spelling.suggest.Suggester</str>
                <str
name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
                <str name="field">suggest</str>
                <float name="threshold">0</float>
                <str name="buildOnCommit">true</str>
        </lst>
        <lst name="spellchecker">
                <str name="name">default</str>
                <str name="field">suggest</str>
                <str name="classname">solr.DirectSolrSpellChecker</str>
                <str name="distanceMeasure">internal</str>
                <float name="accuracy">0.2</float>
                <int name="maxEdits">2</int>
                <int name="minPrefix">1</int>
                <int name="maxInspections">50</int>
                <int name="minQueryLength">2</int>
                <float name="maxQueryFrequency">0.01</float>
        </lst>
        <lst name="spellchecker">
                <str name="name">wordbreak</str>
                <str name="classname">solr.WordBreakSolrSpellChecker</str>
                <str name="field">suggest</str>
                <str name="combineWords">true</str>
                <str name="breakWords">true</str>
                <int name="maxChanges">10</int>
        </lst>
</searchComponent>
        
        
<requestHandler class="org.apache.solr.handler.component.SearchHandler"
name="/suggest">
        <lst name="defaults">
                <str name="spellcheck">true</str>
                <str name="spellcheck.dictionary">default</str>
                <str name="spellcheck.dictionary">wordbreak</str>
                <str name="spellcheck.dictionary">suggest</str>
                <str name="spellcheck.onlyMorePopular">true</str>
                <str name="spellcheck.count">10</str>
                <str name="spellcheck.collate">true</str>
        </lst>
        <arr name="components">
                <str>suggest</str>
        </arr>
</requestHandler>

As soon as I post a query on
http://url.com:8983/solr/mycore/suggest?q=bar&wt=json

I get an empty answer

{"responseHeader":{"status":0,"QTime":0}}

No errors or warnings in the log. Any ideas?

Simon



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-Suggest-does-not-work-in-solrcloud-environment-tp4071587.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to