You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Tommaso Teofili <te...@adobe.com> on 2013/01/24 10:46:37 UTC
question on custom indexes
Hi all,
maybe that's a silly question but I wonder what is currently considered the best practice for where to create index nodes.
Do they all have to (or _should_) be under a same (e.g. query:index) node or rather (as I remember it was discussed) on specific paths? Or it may depend on the specific implementation?
Thanks in advance for your help,
Tommaso
Re: question on custom indexes
Posted by Tommaso Teofili <te...@adobe.com>.
On 24/gen/2013, at 10:59, Thomas Mueller wrote:
> Hi,
>
> The current code assumes the index configuration nodes are under
> /oak:index.
Ok thanks for the clarification Thomas, that sounds good for now.
>
> We discussed that index nodes could be local, where the content is, if the
> index only applies to a subtree (is not repository-wide). But this would
> make things more complicated in the index code: when updating the content,
> all relevant indexes need to be updated, so the indexes must be known at
> that time or discovered during the update. The same when running a query.
> It's possible to do, but so far we didn't start implementing this feature.
maybe keeping a prefix tree of all the indexes could be a fast way to retrieve all the indexes which lay under a certain path (avoiding node-is-an-index checks), where the prefix tree gets updated by QueryIndexProviders.
My 2 cents,
Tommaso
>
> Regards,
> Thomas
>
>
>
> On 1/24/13 10:46 AM, "Tommaso Teofili" <te...@adobe.com> wrote:
>
>> Hi all,
>>
>> maybe that's a silly question but I wonder what is currently considered
>> the best practice for where to create index nodes.
>> Do they all have to (or _should_) be under a same (e.g. query:index) node
>> or rather (as I remember it was discussed) on specific paths? Or it may
>> depend on the specific implementation?
>>
>> Thanks in advance for your help,
>> Tommaso
>
Re: question on custom indexes
Posted by Thomas Mueller <mu...@adobe.com>.
Hi,
The current code assumes the index configuration nodes are under
/oak:index.
We discussed that index nodes could be local, where the content is, if the
index only applies to a subtree (is not repository-wide). But this would
make things more complicated in the index code: when updating the content,
all relevant indexes need to be updated, so the indexes must be known at
that time or discovered during the update. The same when running a query.
It's possible to do, but so far we didn't start implementing this feature.
Regards,
Thomas
On 1/24/13 10:46 AM, "Tommaso Teofili" <te...@adobe.com> wrote:
>Hi all,
>
>maybe that's a silly question but I wonder what is currently considered
>the best practice for where to create index nodes.
>Do they all have to (or _should_) be under a same (e.g. query:index) node
>or rather (as I remember it was discussed) on specific paths? Or it may
>depend on the specific implementation?
>
>Thanks in advance for your help,
>Tommaso