Closed (outdated)
Project:
Search API Solr
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 May 2015 at 12:48 UTC
Updated:
8 Aug 2019 at 13:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
esbite commentedFilename should have been #1, didn't understand it would actually make a comment when editing the subject :)
Comment #2
drunken monkeyHm, yes, it's tricky, currently we need to more or less duplicate Solr's own processing/tokenizing in Drupal to make autocompletion work properly. Maybe #2348973: Add suggester support for the autocomplete functionality would be a general solution for this problem, but currently I guess we need to make do.
So, your patch seems like a reasonable solution for that particular problem. It might not be what some people want, though, so I'd say we should make it configurable.
Patch attached, please enable the "Transliterate user input" option for the server and then verify this still works as desired.
Comment #3
drunken monkeyRevised patch, displaying the option only if transliteration is even available.
Comment #4
esbite commentedI have to redact my earlier comment and patch, it worked for that specific problem, but we have now removed it from production.
When further developing our search feature we also had two other issues with autocomplete, it included punctuation in suggestions, and it used stemming of words creating strange things in Swedish which we didn't want. When solving those issues we also solved the issue with diacritics and had to disable this patch.
Instead of using the default Solr settings we created an aggregate field in Search API and are now using only that field for autocomplete. We've then set specific configurations for that field in Solr so that it handles transliteration and tokenizing differently.
We found a helpful guide in this comment:
https://www.drupal.org/node/2091995#comment-8402883
Comment #5
OanaIlea commentedThis issue was closed due to lack of activity over a long period of time. If the issue is still acute for you, feel free to reopen it and describe the current state.