I'm using solr for the search functionality on my webapp. I append an "*" to the end of each user's search. So, if the search is: foo
I change it to filename:foo*
This works fine, except that often a hyphen will be included in the user's search. A search of filename:foo-bar*
returns zero results, as the hyphen removes any search results produced from the search term(s) after it. I can escape it, as filename:foo\-bar*
but I still get zero results. If I try filename:foo"-"*
the search returns all documents.
Any suggestions on how to get -
and *
to play nice with one another?
Thanks for the help