how to set word variations

  • rvs
    3 years, 6 months ago #19934


    Is it possible within the settings to let the configuration find related words.



    Or do we need to tag all products with related words?

    3 years, 6 months ago #19935

    You can define synonyms in Elasticsearch or Solr. If you can find some for flowers and put them in the right format in a single file.

    Manage Elasticsearch and Solr analyser configuration files

    1 year, 1 month ago #31366

    I have uncommented this line in schema.xml,
    Image syn1.png of
    also added an example synonym mapping in synonys.txt
    Image syn2.png of
    and reindexed all data. Anything more needed to make this work ?
    I tried to search for post having title limited, but it should also search for title containing ‘limtd’. I am testing this on localhost.

    1 year, 1 month ago #31372

    You should use the synonym graph filter

    1 year, 1 month ago #31373

    We have different schema.xml, in which file, this needs to be added ?

    1 year, 1 month ago #31374

    solr.SynonymFilterFactory is marked as deprecated. The synonym graph filter is to be used instead. You can find examples in the documentation link.

    1 year, 1 month ago #31379

    As you mentioned to use : You should use the synonym graph filter.
    I checked out this link :,
    We are using Elastic index, is this still applicable to us ?
    it has 2 parts: one for elastic search and another for Solr, Can I skip the second part.
    We updated the schema and synonyms.txt file, still didnt see any changes related to synonyms, do we need to do those configuration changes mentioned in part 1 or 2 ?

    1 year, 1 month ago #31382

    The schema you showed me is a Solr schema, hence my answer related to Solr.
    You can indeed follow for Elasticsearch synonyms configuration.

    1 year, 1 month ago #31383

    Okay. This synonym.txt file should be maintained in server side, or it will be inside plugin only. In case of elastic index, do we need to do anything with schema.xml, when I checked the plugin, I found multiple schema.xml file.
    I am checking if we can keep synonym file in plugin, so that I can update frequently without having to push this to server.

    1 year, 1 month ago #31384

    schema.xml is for Solr indexes only.

    There is nothing inside the plugin to push synonyms to Elasticsearch, because there is no API to do that.

    (Algolia is the only search engine that provides a way to set synonyms from a dashboard UI)

    1 year, 1 month ago #31385

    Okay, Can we add synonyms to existing index, or new index with synonyms must be created ?
    Here, after adding my synonyms file in location [/analysis/synonym.txt], If I run this same command, it will be linked to existing index right ? without any data loss in the index.
    Image image.png of

    1 year, 1 month ago #31387

    No, it will not work. This documentation is related to a new index, not set with the WPSOLR’s index definitions.

    You will have to create a new index from the command line, with a custom analyser including a synonyms filter.

    Let me make some tests, and I’ll post here the command to execute.

    1 year, 1 month ago #31388

    Or is there any way to manipulate queries. We are trying to send the correct query if user enters some spelling mistakes, here not taking about suggestions. but even if user enters wrong spelling, trying to match that words in a text file and send that correct value to query. same concept as mapping in synonym file.. want to use such format of txt

    1 year, 1 month ago #31389

    The best way to do it with Elasticsearch is with synonyms files. But it’s not automatic, you’ll have to perform manual tasks (upload the file, and apply a command to reload it)

    With Algolia, you can do it live on their UI.

    With Weaviate, this is another level: search is based on meaning, and therefore is very resilient to any kind of mismatch between query and content.

    1 year, 1 month ago #31390

    Okay, let me if you get some commands to execute, after your tests.

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.