When calculating a score, you _do_ care about the
rest of the OR clauses since they can contribute to
the score.

It seems that  you'd need an syntax to express
"And I don't care about scoring". Which is really
an fq clause, so maybe this would have to go into
logic there?


On Mon, Jul 22, 2013 at 4:17 AM, Mikhail Khludnev
<[email protected]> wrote:
> Short answer, no - it has zero sense.
>
> But after some thinking, it can make some sense, potentially.
> DisjunctionSumScorer holds child scorers semi-ordered in a binary heap.
> Hypothetically inequality can be enforced at that heap, but heap might not
> work anymore for such alignment. Hence, instead of heap TreeSet can be used
> for experiment.
> fwiw, it's a dev list question.
>
>
> On Mon, Jul 22, 2013 at 4:48 AM, Deepak Konidena <[email protected]>
> wrote:
>>
>> I understand that lucene's AND (&&), OR (||) and NOT (!) operators are
>> shorthands for REQUIRED, OPTIONAL and EXCLUDE respectively, which is why
>> one can't treat them as boolean operators (adhering to boolean algebra).
>>
>> I have been trying to construct a simple OR expression, as follows
>>
>> q = +(field1:value1 OR field2:value2)
>>
>> with a match on either field1 or field2. But since the OR is merely an
>> optional, documents where both field1:value1 and field2:value2 are
>> matched,
>> the query returns a score resulting in a match on both the clauses.
>>
>> How do I enforce short-circuiting in this context? In other words, how to
>> implement short-circuiting as in boolean algebra where an expression A ||
>> B
>> || C returns true if A is true without even looking into whether B or C
>> could be true.
>> -Deepak
>
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to