Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15841

Multi-word Synonym words in between

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 8.8.2
    • None
    • search
    • None

    Description

      Hi all,

      There is  multi word synonym configured like below

      boys pajamas => boys pajamas, sleep play

       when we search for" boys pajamas" , we do get results of sleep play. That is working fine. However when someone searches for "boys red pajamas", we want 'sleep play' results to come , but it does not getting triggered due to  'red' in between.

       

      Is  it  possible to have  same synonym triggered, if words need not be  in same order ? My schema looks like below

      <fieldType name="graph_enricher_field_type" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.ASCIIFoldingFilterFactory"/> <!-- The idea of how 'multiwords' stop phrases should be removed: - SynonymGraphFilterFactory replaces each stop phrase to '*' - PatternReplaceFilterFactory reduces this token to empty token - LengthFilterFactory filter our this token So pls please keep this tree filters together (at least in one chain) --> <filter class="solr.SynonymGraphFilterFactory" ignoreCase="true" synonyms="stopphrases.txt"/> <filter class="solr.PatternReplaceFilterFactory" pattern="[^a-z0-9]" replacement="" replace="all"/> <filter class="solr.LengthFilterFactory" min="1" max="1024" /> <filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" format="solr" ignoreCase="true" expand="true" tokenizerFactory="solr.WhitespaceTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.ASCIIFoldingFilterFactory"/> <filter class="solr.PatternReplaceFilterFactory" pattern="[^a-z0-9]" replacement="" replace="all"/> <filter class="solr.LengthFilterFactory" min="1" max="1024" /> <filter class="solr.StemmerOverrideFilterFactory" dictionary="stemdict.txt" ignoreCase="true"/> <filter class="solr.KStemFilterFactory"/> </analyzer> </fieldType>

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            mp.ratna Ratna Puttaswamy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: