Hooks to change Elasticsearch settings and mapping

  • pseudo visitor
    Participant
    6 years ago #6892

    In the PRO version are there any WordPress hooks that can change Elasticsearch settings and mapping?

    Authors posts could only be found by matching perfectly firstname + lastname string, and that would need to be changed in the mapping before indexing.

    wpsolr
    Keymaster
    6 years ago #6893

    Yes and no.

    No : I started a generic mapping by drag&drop with all analysers/filters a few month ago, but did not finish it.

    Yes : but in the PRO version, you can select a type for each searched fields (the “boosts”). By default the type is text without analysers. But you can also select the type with the default analysers.

    Boosts change the analyser

    pseudo visitor
    Participant
    6 years ago #6897

    I can change the ‘author’ default type ‘keyword’ to ‘text’ in the ‘Search field boosts’?

    Have you considered adding a “quote” char_filter in the settings?

    I found problematic searching for words with apostrophes using the plugin free version.

    “char_filter”: {

    “quotes”: {

    “type”: “mapping”,

    “mappings”: [

    “\\u0091=>\\u0027”,

    “\\u0092=>\\u0027”,

    “\\u2018=>\\u0027”,

    “\\u2019=>\\u0027”,

    “\\u201B=>\\u0027”

    ]
    }
    }

    wpsolr
    Keymaster
    6 years ago #6898

    You are saying that I could change the ‘author’ default type ‘keyword’ to ‘text’ in the ‘Search field boosts’?

    yes

    Have you considering to add a “quote” char_filter in the settings?

    No, because there are tens/hundreds of other possible tunings, only adapted to specific needs. That was the purpose of my previous generic mapping settings.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.