lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kun Hong <kh...@promptu.com>
Subject Can Query.toString() output be parsed to the same query?
Date Tue, 03 Apr 2007 04:01:08 GMT
Hi,

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?
Unless there is something prevent us to do so, such
as: not every query has a feasible string representation
that can be parsed to it.

I have one example here to clarify what I am talking about:
I construct a MultiPhraseQuery to search  the title field
that is equivalent to searhching "rolling stone" as a prefix.
The output of the query's toString method is

title:"rolling (stone stoned stones)"

But this string will not be parsed back to a MultiPhrase query
but instead to a PhraseQuery consisting of Terms "rolling",
"stone", "stoned" and "stones".

Thanks in advance for any answers.

Kun

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message