Hooks to change Elasticsearch settings and mapping
- pseudo visitorParticipant6 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.
wpsolrKeymaster6 years ago #6893Yes 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.
pseudo visitorParticipant6 years ago #6897I 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”
]
}
}wpsolrKeymaster6 years ago #6898You 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.
You must be logged in to reply to this topic.