Improve fulltext search in entity explorer
Closed this issue · 1 comments
joschne commented
Problem
Search in geovistory.org for Girard Grégoire.
-> no result
And search in geovistory.org for Grégoire Girard.
-> finds one person
Desired behavior
Search for Girard Grégoire should find the same person as search for Grégoire Girard.
Solution
The code responsible for the search is here:
The getTextFilter() function is called from different places.
The text filter generated by the function is using Lucene syntax included in SPARQL, as described here:
- https://jena.apache.org/documentation/query/text-query.html#query-with-sparql
- https://lucene.apache.org/core/6_4_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description
Change the filter string to be match the desired behavior.
perrauda commented
Gaetan suggests that searching with unaccented letters (e instead of é for example...) can still find the right words like Gregoire for Grégoire.