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? Chetan Mehrotra
