lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Au" <>
Subject QueryParser, PrefixQuery, and case sensitivity
Date Fri, 04 May 2007 19:17:37 GMT
I have an index with both fields that are case sensitive and insensitive.  I
am trying to use a QueryParser to accept query from end users for
searching.  The default behavior of QueryParser is to lowercase the prefix
text to create the PrefixQuery.  So wildcard search on the case sensitive
fields does not work.  If I use QueryParser.setLowercaseWildcardTerm(false),
then wildcard search on the case insensitive fields does not work.

Here is an example with two fields, name (case sensitive) and desc (case
insensitive).  The docment is

name (case sensitive): PowerBook
desc (case insensitive): professional  mac laptop

I want to be able to find the document with the following query:

+name:Power* +field:Pro*


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message