On Thu, Sep 13, 2012 at 9:11 AM, Tim Williams <[email protected]> wrote:
> Can someone validate my understanding of what's supposed to happen for
> result fetching?
>
> For a Row Query (ie. the default, SuperQueryOn == true):
>
> ..if I add a selector (e.g. blurQuery.setSelector(new Selector())),
> then I'm able to traverse directly over RowResults that are fully
> populated, like:
>
> FetchResult fr = r.getFetchResult();
> fr.getRowResult().getRow().getId();
>
> ...but then, if I do a Record Query (ie. SuperQueryOn == false):
>
> ...and add the same selector (e.g. blurQuery.setSelector(new
> Selector()), I would have thought, I'd be able to do something
> similar, like:
>
> FetchResult fr = r.getFetchResult();
> fr.getRecordResult().getRecord().getRecordId();
>
> .. but the record isn't populated.  So, I'm not getting why the
> apparent inconsistency.  Do I need to do something different to
> automatically fetch the record results?

After a spin through BlurResultIterableSearcher, I'll answer myself:)
The default Selector is specifically a Row selector - you have to
create a new Selector and setRecordOnly(true) to get the desired
behavior.

This does make me wonder we can't use a simple boolean flag
(fetchResults(true)) on the query and internally create the right
selector based on the value of SuperQueryOn?

Thanks,
--tim

Reply via email to