jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ard Schrijvers <a.schrijv...@onehippo.com>
Subject Re: Query over multiple workspaces
Date Wed, 17 Nov 2010 10:56:08 GMT
On Wed, Nov 17, 2010 at 10:28 AM, Gadbury <gadbury@googlemail.com> wrote:
>
> Sorry to jump on this thread but it seems like the relevant place to ask the
> question.
>
> If we used versioning to archive old content, is it possible to dynamically
> include / exclude the versioned content in a query?
>
> I'm working on an ecommerce web app whereby digital content can be
> downloaded.  If a product is removed (or rather, removed from sale), users
> that have purchased he product should still be able to download the content
> (so really, it is not deleted).  It would make sense for me to be able to
> differentiate between 'deleted' and non-deleted products.  At present, I
> just use a boolean flag but it's not ideal.  It would be nice to be able to
> have two queries.... one that queries just the available content and one
> that queries available and archived content.  Is this possible?

By default the switch is made by checking the query: If it does not
start with /jcr:root/jcr:system, then versioning index is skipped as
it can never have a hit there.

If you want to query version history as well, you cannot include a
path constraint that is 'outside' versioning. You can also extend the
SearchIndex to hook in your own logic whether the version index should
be used. I don't think however you can somehow 'add' this info to a
query like xpath: how would this look in xpath?

Regards Ard

> --
> View this message in context: http://jackrabbit.510166.n4.nabble.com/Query-over-multiple-workspaces-tp3044432p3046345.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>



-- 
Hippo
Europe  •  Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31 (0)20 522 4466
USA  • San Francisco  185 H Street Suite B  •  Petaluma CA 94952-5100
•  +1 (707) 773 4646
Canada    •   Montréal  5369 Boulevard St-Laurent  •  Montréal QC H2T
1S5  •  +1 (514) 316 8966
www.onehippo.com  •  www.onehippo.org  •  info@onehippo.com

Mime
View raw message