Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 67938 invoked from network); 25 Jun 2008 00:15:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jun 2008 00:15:17 -0000 Received: (qmail 79089 invoked by uid 500); 25 Jun 2008 00:15:12 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 79054 invoked by uid 500); 25 Jun 2008 00:15:12 -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 79043 invoked by uid 99); 25 Jun 2008 00:15:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2008 17:15:12 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of chris.lu@gmail.com designates 209.85.128.189 as permitted sender) Received: from [209.85.128.189] (HELO fk-out-0910.google.com) (209.85.128.189) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2008 00:14:20 +0000 Received: by fk-out-0910.google.com with SMTP id 18so2996696fkq.5 for ; Tue, 24 Jun 2008 17:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=WQ8j4zJFheCxNgTwb974hPrOurs1yllJTjcnumguTdw=; b=xuvSCNCBOfghTJDl5Vh7xgNHgZIweT/lM3eDaZvCflHzsEbjUKtUwerqEWxfiSGIMa iXAdKZ5Xjb8bFFR7YoIk88LQi92FKy5CDO1/m0xaXQdIXmKSrClrURW+4kMMqFw2/PWv u7eHPP7fzhQPLGbOHEpA2ULoS8XSrT7wvKrkE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=g51126WSYAqfXdLVsyX2QX8Tpj9it4jBP3lx87yubG1ZtBHiK/SOAf40f4byZ3U0QO u6IKT7jMGg9lgAJjKgiCZRVlyCSf8MdEZQiK50pWxkjVddwGMzH1phtidoCw4SMGHcMy ESYx7TbmFoBgtFN78so4SyEQNEZg1NaGE4QG0= Received: by 10.78.178.5 with SMTP id a5mr3579044huf.39.1214352878121; Tue, 24 Jun 2008 17:14:38 -0700 (PDT) Received: by 10.78.155.18 with HTTP; Tue, 24 Jun 2008 17:14:38 -0700 (PDT) Message-ID: <6e3ae6310806241714q71284d3csb8f19d7e0f681856@mail.gmail.com> Date: Tue, 24 Jun 2008 17:14:38 -0700 From: "Chris Lu" To: "java-user@lucene.apache.org" Subject: lucene query parser for double-worded term query MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_32464_32239748.1214352878092" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_32464_32239748.1214352878092 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I have a tags field. And each tag can have multiple words, like "San Francisco". Each tag is analyzed into Keyword field like this new Field("tags", "San Francisco",Field.Store.YES, Field.Index.UN_TOKENIZED) It should be searchable if using TermQuery directly, like new TermQuery(new Term("tags", "San Francisco")) But how to achieve this via Lucene Query Parser? If using tags:"San Francisco" It's considered a phrase, and turned into term search of tags:San and tags:Francisco, which will not return results. Thanks for any advice! -- Chris Lu ------------------------- Instant Scalable Full-Text Search On Any Database/Application site: http://www.dbsight.net demo: http://search.dbsight.com Lucene Database Search in 3 minutes: http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes DBSight customer, a shopping comparison site, (anonymous per request) got 2.6 Million Euro funding! ------=_Part_32464_32239748.1214352878092--