Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 52074 invoked from network); 11 Dec 2001 18:46:36 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 11 Dec 2001 18:46:36 -0000 Received: (qmail 18211 invoked by uid 97); 11 Dec 2001 18:45:39 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@jakarta.apache.org Received: (qmail 18189 invoked by uid 97); 11 Dec 2001 18:45:38 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 15774 invoked from network); 11 Dec 2001 16:57:53 -0000 X-Originating-IP: [63.87.177.13] From: "Dzung Nguyen" To: lucene-user@jakarta.apache.org Bcc: Subject: Search different terms for different fields (Complex Query) Date: Tue, 11 Dec 2001 16:57:52 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 11 Dec 2001 16:57:52.0689 (UTC) FILETIME=[F8E08A10:01C18264] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Please help In my LuceneDocument, I have three fields (title, library, content) and I would like to search for 'myText' in the content field AND it should also match 'myLibrary' in Library field. "content:myText: AND "library:myLibrary" It should only return hit if 'myText' is in the content and 'myLibrary' is in the library field. I read the Lucene FAG and it mention about complex query but does NOT give any example. Can someone please help me with some sample code. Thanks Here is what the FAG say: "A more complex queries may contain nested queries with 'and', 'or', 'not' or 'phrase' relations. Queries may also contains specification of which document fields to match against the various parts of the query (.e.g. 'authors' and 'title') and hints that may effects the ranking of the matched documents ('boost' factor)." _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: For additional commands, e-mail: