lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Can Query.toString() output be parsed to the same query?
Date Thu, 05 Apr 2007 21:40:19 GMT

: I am new to Lucene. I find that the output
: of the Query.toString() method cannot be parsed
: back to the same query. Is it true? If it is
: true, I am wondering why not make the output of
: Query.toString() parsable to the same query again?

some of hte more simplified query classes generate a toString that is
parsable by the QueryParser -- but not all (because there are many more
types of queries then there are special markup in the QueryPArser to
denote them)

In general, no matter how robust a parser you might might write, you can
never get perfect reparsing of a Query.toString unless the "Analyzyer"
you use is extremely simplistic -- Analyzers are not required to be
transitive, ie: analysis(foo) == bar does not imply analysis(bar) == bar

(think of stemming for example)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message