On 03/02/2011 10:19 AM, Damon Feldman wrote:
> Mike,
>
> Items 2 and 3 are both great approaches, IMO. Item 1 seems less clean and I
> suggest keeping discrete system values in attributes instead.
>
> Lexicons, including a collection lexicon, uri lexicon, or range indexs, are
> always the fastest, but do consume more memory. That may be a premature
> optimization becuase using your attribute approach should be very fast. A
> cts:and-query() with three cts:element-attribute-value() queries will then
> work.
>
Damon - I don't think so - I need to ensure the match is on a single
collection, not (possibly) on multiple collections a single document,
which the and-query would allow, so I think in case 3 I would end up
with a query like:
cts:element-query("collection"
cts:attribute-value-query("collection", "site-id", $site-id),
cts:attribute-value-query("collection", "content-set-id",
$content-set-id),
cts:attribute-value-query("collection", "status", $status)
)
My main question is whether the element-query is going to be
problematic: I have had scaling issues with it in the past, but I wonder
whether the fact that these attributes are all on the same element might
make that less problematic...
-Mike
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general