2014-07-31 15:20 GMT+02:00 Chetan Mehrotra <[email protected]>:

> On Thu, Jul 31, 2014 at 5:23 PM, Thomas Mueller <[email protected]> wrote:
> > You could simply have *multiple* index instances, and each index returns
> > its own cost or plan(s). The query engine will figure out which index to
> > use.
>
> Aah missed the fact that QueryProvider can return multiple indexes.
> That would simplify things!
>
> > As for OAK-2005, you *could* implement the AdvanceQueryIndex. Actually it
> > would be nice if that's implemented (just in general). But you *have* to:
> > you could just implement a regular QueryIndex, and return the cost or
> > infinity. If you implement AdvanceQueryIndex, return either none or one
> > IndexPlan. No need to return multiple IndexPlan.
>
> The interest in AdvanceQueryIndex was to support ordering. Filter does
> not provide any info wrt ordering requirement. IndexPlan provides
> access to ordering information which can be used to order results in
> Lucene. So would go with the suggestion of returning one plan per
> index.
>
> btw any plans to add hint support to force usage of specific index?
>

as far as I know one workaround to trigger usage of a specific index is to
use the native language supported by that specific index, but then that, of
course, would require writing the query in a implementation specific way
(e.g. select * from [nt:base] where native('lucene','title:foo -title:bar')
).

Regards,
Tommaso


> Chetan Mehrotra
>

Reply via email to