SOLR not applying managed synonyms

Created on 3 May 2024, 11 months ago

Problem/Motivation

No results when searching on added synonyms (Synonyms are in SOLR)

Steps to reproduce

I am using SOLR 8.11.3
I installed the module as specified in the readme. I am able to succesful export to Solr. I can see the new added synonyms in the solr rest endpoint (/solr/collection_name/schema/analysis/synonyms/english). When visiting this endpoint i see a synonymMappings object with managedMap containing the new synonyms.

The file /solr/#/collection_name/files?file=_schema_analysis_synonyms_english.json was automatically created. So far so good. But when searching in Drupal i dont get results when searching on a synonym.

I modified (changed query parser to ManagedSynonymGraphFilterFactory) the schema_extra_types.xml for the fields below

I restarted/reloaded SOLR. I even tried to add the synonym filter to index analyser and reindexing, also without results.
What am i missing?

💬 Support request
Status

Active

Version

2.0

Component

Documentation

Created by

🇳🇱Netherlands robbertnl

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @robbertnl
  • Status changed to Needs review 11 months ago
  • 🇮🇳India bhojwanipankaj05

    @robbertnl It may be confusion with Word and Synonym while adding synonyms. Can you reverse Word with Synonym and Synonym with Word and then check again?

  • 🇳🇱Netherlands robbertnl

    @bhojwanipankaj05 Can you explain what you said "reverse Word with Synonym and Synonym with Word"? I don't understand. Are you referring to Spelling errors vs Synonyms? I am sure i added as synonyms

  • Status changed to Active 11 months ago
  • Status changed to Needs review 11 months ago
  • 🇮🇳India bhojwanipankaj05

    @robbertnl
    Just go to Edit any synonym and reverse the Word field text with Synonym field and Synonym field text with Word field and then update the form, Export to Solr, and check it again.

  • Status changed to Closed: outdated 6 months ago
  • 🇳🇱Netherlands robbertnl

    @bhojwanipankaj05 Thank you for you reply. But it didn't help.
    Apparently you also have to add ManagedSynonymGraphFilterFactory to your index, even if you want to use it at query time. This is what i needed to get it working

  • 🇮🇳India bhojwanipankaj05

    Hi Robbert,
    I hope this module helps and your feedback is acceptable for improvements.

  • 🇺🇸United States safetypin Memphis, Tennessee

    Could you detail how i can add ManagedSynonymGraphFilterFactory to my index? I don't see it in the processors, and i'm working with a situation that sounds very similar to this: i've added synonyms both ways (reversing the synonym/word position in the config) without seeing any correlation between the two words.

Production build 0.71.5 2024