On Thu, Mar 29, 2007 at 06:42:16PM -0400, John Bachir wrote:
> I jut noticed this example in the lucene documentation*:
> 
>   title:(+return +"pink panther")
> 
> I have been using this syntax:
> 
>   +title:(return AND "pink panther")
> 
> Seemingly with success. Are both acceptable? I couldn't find any  
> documentation on "the plus sign" itself.

the plus sign marks a required clause in a query. A document can only be
a hit if it matches that clause. The opposite of this is the minus sign,
documents that match such a clause can't be a hit. Internally, Ferret
doesn't handle AND and such, they get translated by the query parser,
i.e. 'a AND b' --> '+a +b'

Clauses without + or - are optional 'nice to have' clauses, they will
raise a document's score if they match, but the doc won't be excluded
from the hits if they don't. So 'a OR b' gets transformed into 'a b'.

Jens

-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to