On 17/01/2015 15:55, Gerald Richter wrote:
When I now run a query (either with a TermQuery or a WildcardQuery), and the indexed document was "Foo baß", 
it works as long as I query for "foo", but not when I query for "Foo" or "baß". So I 
guess I have to run the query string thru the same analyzer as the indexer does.

The question is how can I do this or is Lucy able to do this for me?

Lucy's Query classes do that automatically for you. My guess is that either your indexed document or your query term contain a "ß" character in the wrong encoding. The most common reasons are:

- UTF-8 string in source code without "use utf8;".
- String read from UTF-8 file without setting the file encoding
  or without decoding manually.

If a search for "ba\xC3\x9F" works, then the problem is with the indexed document. If a search for "ba\xDF" works, the problem is with your query term.

Nick

Reply via email to