Using full text search I found that when using dots in the search field, nothing is returned. When enclosing them in quotation marks it works fine. I cannot explain why this would work this way.
Example:
The entity contains a reference like: A.8.1. This reference is something the user would want to search for. When entering A.8.1 in the search field nothing is returned. When entering “A.8.1”, the entity is returned as expected.
Obviously, I would like to have the user be able to find the entity using the plain reference (without the quotation marks).
Also, replacing the dots with underscores works ok.
This happens because lucene IndexWriter in FTS module uses EntityAttributeTokenizer to split that indexed text into tokens, and this tokenizer thinks that dot always separates tokens. We have plans to replace this EntityAttributeTokenizer with StandardTokenizer (the last one will not split words like “A.8.1” into several tokens).
I looked to the code, and unfortunately the part of the FTS module that initializes the IndexWriter is not easily extendable. So, at the moment, there is no easy way to override the standard behavior in your project.
Hi Max, thanks for following up on this. I actually thought the web-screens.xml only provides the option for overriding screens, not ‘simple’ classes. But it works which is great!