Hi there,

While checking the schema.xml generated by this module I discovered that the compoundwords dictionary is only used for english.
To change this you have to extend the file /apachesolr_multilingual/resources/fieldType_text_LANGUAGE.xml with this line:

<filter class="solr.DictionaryCompoundWordTokenFilterFactory" dictionary="compoundwords[LANGUAGE_ID].txt" />

An appropriate patch is attached.

Cheers,
Peter

Comments

mkalkbrenner’s picture

/apachesolr_multilingual/resources/fieldType_text_LANGUAGE.xml already contains the DictionaryCompoundWordTokenFilterFactory:

    <fieldType name="text[LANGUAGE_ID]" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <!-- Case insensitive stop word removal.
          add enablePositionIncrements=true in both the index and query
          analyzers to leave a 'gap' for more accurate phrase queries.
        -->
        <filter class="solr.StopFilterFactory"
                ignoreCase="[IGNORE_CASE_STOPWORDS]"
                words="stopwords[LANGUAGE_ID].txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory"
                splitOnCaseChange="[SPLIT_ON_CASE_CHANGE_INDEX]"
                splitOnNumerics="[SPILT_ON_NUMERICS_INDEX]"
                stemEnglishPossessive="[STEM_ENGLISH_POSSESSIVE_INDEX]"
                generateWordParts="[GENERATE_WORD_PARTS_INDEX]"
                generateNumberParts="[GENERATE_NUMBER_PARTS_INDEX]"
                catenateWords="[CATENATE_WORDS_INDEX]"
                catenateNumbers="[CATENATE_NUMBERS_INDEX]"
                catenateAll="[CATENATE_ALL_INDEX]"
                preserveOriginal="[PRESERVE_ORGINAL_INDEX]"
                />
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.DictionaryCompoundWordTokenFilterFactory" dictionary="compoundwords[LANGUAGE_ID].txt" />
        <filter class="solr.SnowballPorterFilterFactory" language="[LANGUAGE_NAME]" protected="protwords[LANGUAGE_ID].txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms[LANGUAGE_ID].txt" ignoreCase="[IGNORE_CASE_SYNONYMS]" expand="true"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="[IGNORE_CASE_STOPWORDS]"
                words="stopwords[LANGUAGE_ID].txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory"
                splitOnCaseChange="[SPLIT_ON_CASE_CHANGE_QUERY]"
                splitOnNumerics="[SPILT_ON_NUMERICS_QUERY]"
                stemEnglishPossessive="[STEM_ENGLISH_POSSESSIVE_QUERY]"
                generateWordParts="[GENERATE_WORD_PARTS_QUERY]"
                generateNumberParts="[GENERATE_NUMBER_PARTS_QUERY]"
                catenateWords="[CATENATE_WORDS_QUERY]"
                catenateNumbers="[CATENATE_NUMBERS_QUERY]"
                catenateAll="[CATENATE_ALL_QUERY]"
                preserveOriginal="[PRESERVE_ORGINAL_QUERY]"
                />
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.SnowballPorterFilterFactory" language="[LANGUAGE_NAME]" protected="protwords[LANGUAGE_ID].txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>

Could you please post your schema.xml that has been generated?

das-peter’s picture

Ouch, I was working with HEAD instead of DRUPAL-6--2.
I'll check my D7 port too. To make sure it fit's to the latest version.
Sorry for the inconvenience.

mkalkbrenner’s picture

Status: Active » Closed (fixed)