You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Aviran Mordo <am...@infosciences.com> on 2003/07/30 21:39:49 UTC

Bug: TermQuery toString - incorrect

I have a TermQuery object which contains a term which has space (two
words). But when I do a toString() I get a query that matches an OR
operation.

Example: The Term +"Small Business" results with a toString method as

+(SocioEconomicInformation:Small Business) 

And the expected result should be

+(SocioEconomicInformation:"Small Business")

The problem is when I try to parse it again I get 

+(SocioEconomicInformation:Small Content:Business) 

Because it does not have the double quotes it tokenizes the term "Small
Business" in to two terms [Small] [Business] instead of one [Small
Business]

I use Lucene 1.3 RC1. 

Aviran