I'm trying to find documents containing asterisks/query marks in Solr text field using Edismax parser. Everything works perfectly when I search for usual text (fq={!edismax}textfield:*sometext*
) or even for any other special Lucene character using escaping (fq={!edismax}textfield:*\~*
).
However when searching for *
(fq={!edismax}textfield:*\**
) or ?
(fq={!edismax}textfield:*\?*
) these characters seem not to be escaped, since all documents are returned. I try also URL encoding for escaped characters (like \%2A
instead of \*
), however the result is the same.
The problem appear to concern leading wildcards only, since fq={!edismax}textfield:\**
and fq={!edismax}textfield:\?*
return correct results, but fq={!edismax}textfield:*\*
and fq={!edismax}textfield:*\?
do not (as well as fq={!edismax}textfield:*sometext\*
etc.).
How is it possible to search for *
/?
using Edismax with leading asterisk wildcard?