Hi Thanks for the response.

Per your instructions, I have set up additional request handlers for handling language-specific /selects:

    <!-- generic query -->
    <requestHandler name="/select" class="solr.SearchHandler">
        <lst name="defaults">
            <str name="echoParams">explicit</str>
            <int name="rows">10</int>
            <str name="df">text</str>

            <str name="spellcheck">true</str>
            <str name="spellcheck.collate">true</str>
            <str name="spellcheck.onlyMorePopular">false</str>
            <str name="spellcheck.extendedResults">false</str>
            <str name="spellcheck.count">3</str>
        </lst>
        <arr name="last-components">
            <str>spellcheck</str>
        </arr>
    </requestHandler>

        <!-- English-specific query -->
        <requestHandler name="/select_en" class="solr.SearchHandler">
        <lst name="defaults">
            <str name="echoParams">explicit</str>
            <int name="rows">10</int>
            <str name="df">text</str>

            <str name="spellcheck">true</str>
            <str name="spellcheck.collate">true</str>
            <str name="spellcheck.onlyMorePopular">false</str>
            <str name="spellcheck.extendedResults">false</str>
            <str name="spellcheck.count">3</str>
        </lst>
        <arr name="last-components">
            <str>spellcheck_en</str>
        </arr>
    </requestHandler>

While it may require additional setup I think it works quite elegantly and allows me to do more language-targeted queries in addition to spell suggest.

Thanks again.

Cheers


Hayden

On 06/09/13 16:35, Shalin Shekhar Mangar wrote:
My guess is that you have a single request handler defined with all
your language specific spell check components. This is why you see
spellcheck values from all spellcheckers.

If the above is true, then I don't think there is a way to choose one
specific spellchecker component. The alternative is to define multiple
request handlers with one-to-one mapping with the spell check
components. Then you can send a request to one particular request
handler and the corresponding spell check component will return its
response.

On Thu, Sep 5, 2013 at 11:29 PM, Mr Havercamp <mrhaverc...@gmail.com> wrote:
I currently have multiple spellchecks configured in my solrconfig.xml to
handle a variety of different spell suggestions in different languages.

In the snippet below, I have a catch-all spellcheck as well as an English
only one for more accurate matching (I.e. my schema.xml is set up to capture
english only fields to an english-specific textSpell_en field and then I
also capture to a generic textSpell field):

---solrconfig.xml---

     <searchComponent name="spellcheck_en" class="solr.SpellCheckComponent">
         <str name="queryAnalyzerFieldType">textSpell_en</str>

         <lst name="spellchecker">
             <str name="name">default</str>
             <str name="field">spell_en</str>
             <str name="spellcheckIndexDir">./spellchecker_en</str>
             <str name="buildOnOptimize">true</str>
         </lst>
     </searchComponent>

     <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
         <str name="queryAnalyzerFieldType">textSpell</str>

         <lst name="spellchecker">
             <str name="name">default</str>
             <str name="field">spell</str>
             <str name="spellcheckIndexDir">./spellchecker</str>
             <str name="buildOnOptimize">true</str>
         </lst>
     </searchComponent>

My question is; when I query my Solr index, am I able to load, say, just
spellcheck values from the spellcheck_en spellchecker rather than from both?
This would be useful if I were to start implementing additional language
spellchecks; E.g. spellcheck_ja, spellcheck_fr, etc.

Thanks for any insights.

Cheers


Hayden



Reply via email to