Re: indexing but not tokenizing

2009-03-06 Thread Ian Lea
I don't know how QueryParser works behind the scenes but it looks like this is at least known behaviour. From the QueryParser javadocs: setLowercaseExpandedTerms public void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms) Whether terms of wildcard, prefix, fuzzy and range queries

Re: indexing but not tokenizing

2009-03-06 Thread John Marks
Another problem. Using the PerFieldAnalyzerWrapper solves the case where I have a simple query, such as the following: Query query = parser.parse("X"); or Query query = parser.parse("X OR Y"); but if I use a more complex query like the following: Query query = parser.parse("[A TO

Re: indexing but not tokenizing

2009-03-05 Thread John Marks
Thank you Ian, > If you want a direct suggestion: use PerFieldAnalyzerWrapper, > specifying a different analyzer for field B. > > > -- > Ian. this makes a lot of sense. -John - To unsubscribe, e-mail: java-user-unsubscr...@luc

Re: indexing but not tokenizing

2009-03-05 Thread Ian Lea
Hi I think that the SimpleAnalyzer you are passing to the query parser will be downcasing the X. You can fix it using an analyzer that doesn't convert to lower case, creating the query directly in code, or by using PerFieldAnalyzerWrapper, and no doubt other ways too. If you want a direct sugge

indexing but not tokenizing

2009-03-05 Thread John Marks
Hi all, I'm not able to see what's wrong in the following sample code. I'm indexing a document with 5 fields, using five different indexing strategies. I'm fine the the results for 4 of them, but field B is causing me some trouble in understanding what's going on. The value of field B is X (upper