Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 65960 invoked from network); 3 Apr 2007 04:01:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Apr 2007 04:01:47 -0000 Received: (qmail 87606 invoked by uid 500); 3 Apr 2007 04:01:47 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 87570 invoked by uid 500); 3 Apr 2007 04:01:46 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 87559 invoked by uid 99); 3 Apr 2007 04:01:46 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2007 21:01:46 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [203.144.27.9] (HELO surfers.oz.agile.tv) (203.144.27.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2007 21:01:38 -0700 Received: from [192.168.16.9] (woodgate.oz.agile.tv [192.168.16.9]) by surfers.oz.agile.tv (Postfix) with ESMTP id 38D49A68DA for ; Tue, 3 Apr 2007 14:01:08 +1000 (EST) Message-ID: <4611D184.7050209@promptu.com> Date: Tue, 03 Apr 2007 14:01:08 +1000 From: Kun Hong User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20070213 Fedora/1.0.7-0.6.0.1.fc5 SeaMonkey/1.0.7 MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Can Query.toString() output be parsed to the same query? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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