> Hello > I have a question about this new feature in lucene 3.6 : > " The QueryParser now interprets * as an open end for range queries. > Literal asterisks may be represented by quoting or escaping (i.e. \* or > "*") Custom QueryParser subclasses overriding getRangeQuery() will be > passed null for any open endpoint" > > Does it mean if I have this : QueryParser queryParser = new QueryParser > (version,f,a); > queryParser.parse("blu*"); > > QueryParser assumes it as a RangeQuery like this : [blu TO ]?!!! > Does it call getRangeQuery() method? or I'm making a mistake in the > concept of this feature... . >
No it just means: A query like "[blu TO *]" is working and maps to TermRangeQuery.newStringRange(...,"blu",null,...), which is a half open range. Before you had to do this yourself in the newRangeQuery/getRangeQuery method (and you still need to do this for fields that are Numeric unless you use the new flxible query parser in contrib, which knows the existence of numeric fields since 3.4 or like so). The conventional wildcard syntax does not change. Uwe --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org