Re: SQL Distinct sintax in Lucen

2005-01-11 Thread Daniel Naber
On Tuesday 11 January 2005 23:05, Carlos Franco Robles wrote:

 I'm starting to use lucene and I wonder if it is possible to make a
 query syntax to ask for one string which can be in two different fields
 and filter duplicated results like with distinct in SQL syntax.

Lucene only knows documents and doesn't know what duplicate could mean. 
The easiest thing is to iterate over the result set and do the filtering 
yourself.

regards
 Daniel

-- 
http://www.danielnaber.de

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: SQL Distinct sintax in Lucen

2005-01-11 Thread Chuck Williams
If I understand what you are trying to do, you don't have a problem.
You can OR to your heart's content and Lucene will properly create the
union of the results.  I.e., there will be no duplicates.

There is built-in support for this kind of thing.  See
MultiFieldQueryParser, and for better results, consider
http://issues.apache.org/bugzilla/show_bug.cgi?id=32674.

Chuck

   -Original Message-
   From: Carlos Franco Robles [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, January 11, 2005 2:05 PM
   To: lucene-user@jakarta.apache.org
   Subject: SQL Distinct sintax in Lucen
   
   Hi all.
   
   I'm starting to use lucene and I wonder if it is possible to make a
   query syntax to ask for one string which can be in two different
fields
   and filter duplicated results like with distinct in SQL syntax.
   Something like:
   
   distinct (+string OR OtherField:(+string))
   
   Thanks a lot
   
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]