On Mar 31, 2007, at 1:18 AM, John Joseph Bachir wrote:
>
> On Mar 30, 2007, at 3:32 AM, Jens Kraemer wrote:
>> 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'.
>
>
> Thanks for that, I actually was completely unaware of the case
> without + or -. Very nice.
>
> However, my question was actually more simple: are the semantics of
> these two bit of a query the same?
>
>
> title:(+return +"pink panther")
>
> +title:(return AND "pink panther")
I replied to this the other day, but I think my sending address was
incorrect and it didn't go through - sorry 'bout that. My reply was
this:
-----
Yup, both are acceptable. An "AND" actually affects both sides and
forces them to be required, as if you had used + in front. + is
documented in the document you referenced, just below AND.
If you are combining the queries above with other clauses they may
not be equivalent due to the +title, but if these are the full
queries they are equivalent (at least in Java Lucene).
Erik
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk