You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@gmail.com> on 2011/06/16 11:59:04 UTC

Is the AndCursor useful ?

Hi guys,

just wondering if we need to keep the intermediate AndCursor class ? All 
in all, when building the cursors, if we have a conjonction, we will 
pick the smallest cursor to store it as wrapped into the AndCursor, so I 
wonder if it's not a good idea to simply remove this cursor from the 
equation ?

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Is the AndCursor useful ?

Posted by Kiran Ayyagari <ka...@apache.org>.
On Thu, Jun 16, 2011 at 6:14 PM, Emmanuel Lécharny <el...@apache.org> wrote:
> On 6/16/11 2:02 PM, Kiran Ayyagari wrote:
>>
>> On Thu, Jun 16, 2011 at 5:00 PM, Emmanuel Lecharny<el...@gmail.com>
>>  wrote:
>>>
>>> On 6/16/11 1:18 PM, Kiran Ayyagari wrote:
>>>>
>>>> On Thu, Jun 16, 2011 at 3:29 PM, Emmanuel Lecharny<el...@gmail.com>
>>>>  wrote:
>>>>>
>>>>> Hi guys,
>>>>>
>>>>> just wondering if we need to keep the intermediate AndCursor class ?
>>>>> All
>>>>> in
>>>>> all, when building the cursors, if we have a conjonction, we will pick
>>>>> the
>>>>> smallest cursor to store it as wrapped into the AndCursor, so I wonder
>>>>> if
>>>>> it's not a good idea to simply remove this cursor from the equation ?
>>>>>
>>>> I don't think so, we do need evaluators also
>>>
>>> What for ? Can't we use the underlying cursor's evaluator ?
>>>
>> yeap, agree, this indeed speeds up evaluation
>>
>> OTOH, I prefer to keep a hint about conjunction in the returned cursor
>> or we can also change AndCursor to not use evaluators
>> but just as a dumb wrapper (i.e new AndCursor(IndexCursor) )
>
> Hmmm, seems that the AndCursor also needs to evaluate candidate against the
> non selected indexes. Removing it will simply retruns too many entries.
>
> PS : Sorry if those seem stupid questions, I'm trying to get a key about
> this part of the code I don't know atm. Thanks for the responses.
>
not at all, got a chance to read this code after long time, and it is
worth the time spent.
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>



-- 
Kiran Ayyagari

Re: Is the AndCursor useful ?

Posted by Emmanuel Lécharny <el...@apache.org>.
On 6/16/11 2:02 PM, Kiran Ayyagari wrote:
> On Thu, Jun 16, 2011 at 5:00 PM, Emmanuel Lecharny<el...@gmail.com>  wrote:
>> On 6/16/11 1:18 PM, Kiran Ayyagari wrote:
>>> On Thu, Jun 16, 2011 at 3:29 PM, Emmanuel Lecharny<el...@gmail.com>
>>>   wrote:
>>>> Hi guys,
>>>>
>>>> just wondering if we need to keep the intermediate AndCursor class ? All
>>>> in
>>>> all, when building the cursors, if we have a conjonction, we will pick
>>>> the
>>>> smallest cursor to store it as wrapped into the AndCursor, so I wonder if
>>>> it's not a good idea to simply remove this cursor from the equation ?
>>>>
>>> I don't think so, we do need evaluators also
>> What for ? Can't we use the underlying cursor's evaluator ?
>>
> yeap, agree, this indeed speeds up evaluation
>
> OTOH, I prefer to keep a hint about conjunction in the returned cursor
> or we can also change AndCursor to not use evaluators
> but just as a dumb wrapper (i.e new AndCursor(IndexCursor) )

Hmmm, seems that the AndCursor also needs to evaluate candidate against 
the non selected indexes. Removing it will simply retruns too many entries.

PS : Sorry if those seem stupid questions, I'm trying to get a key about 
this part of the code I don't know atm. Thanks for the responses.

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Is the AndCursor useful ?

Posted by Kiran Ayyagari <ka...@apache.org>.
On Thu, Jun 16, 2011 at 5:00 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
> On 6/16/11 1:18 PM, Kiran Ayyagari wrote:
>>
>> On Thu, Jun 16, 2011 at 3:29 PM, Emmanuel Lecharny<el...@gmail.com>
>>  wrote:
>>>
>>> Hi guys,
>>>
>>> just wondering if we need to keep the intermediate AndCursor class ? All
>>> in
>>> all, when building the cursors, if we have a conjonction, we will pick
>>> the
>>> smallest cursor to store it as wrapped into the AndCursor, so I wonder if
>>> it's not a good idea to simply remove this cursor from the equation ?
>>>
>> I don't think so, we do need evaluators also
>
> What for ? Can't we use the underlying cursor's evaluator ?
>
yeap, agree, this indeed speeds up evaluation

OTOH, I prefer to keep a hint about conjunction in the returned cursor
or we can also change AndCursor to not use evaluators
but just as a dumb wrapper (i.e new AndCursor(IndexCursor) )
> --
>
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>



-- 
Kiran Ayyagari

Re: Is the AndCursor useful ?

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 6/16/11 1:18 PM, Kiran Ayyagari wrote:
> On Thu, Jun 16, 2011 at 3:29 PM, Emmanuel Lecharny<el...@gmail.com>  wrote:
>> Hi guys,
>>
>> just wondering if we need to keep the intermediate AndCursor class ? All in
>> all, when building the cursors, if we have a conjonction, we will pick the
>> smallest cursor to store it as wrapped into the AndCursor, so I wonder if
>> it's not a good idea to simply remove this cursor from the equation ?
>>
> I don't think so, we do need evaluators also

What for ? Can't we use the underlying cursor's evaluator ?

-- 

Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Is the AndCursor useful ?

Posted by Kiran Ayyagari <ka...@apache.org>.
On Thu, Jun 16, 2011 at 3:29 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
> Hi guys,
>
> just wondering if we need to keep the intermediate AndCursor class ? All in
> all, when building the cursors, if we have a conjonction, we will pick the
> smallest cursor to store it as wrapped into the AndCursor, so I wonder if
> it's not a good idea to simply remove this cursor from the equation ?
>
I don't think so, we do need evaluators also
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>



-- 
Kiran Ayyagari