There is no way to specify that a range index only applies based on a filter. A range index will index all QNames for that element in your database.
You can, however, pass a cts:query into the lexicon functions, which can accomplish something similar. -Danny -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Murray, Gregory Sent: Tuesday, June 07, 2011 8:32 AM To: General MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Indexing an element based on attribute value Apologies if this is a common and/or elementary question, but I couldn't find an answer in the ML docs or list archives. I'd like to add an element range index for an element, but only include element values when the element occurs in a specific context -- namely when a particular attribute has a particular value. Example: <language> <languageTerm type="text">English</languageTerm> <languageTerm type="code" authority="iso639-2b">eng</languageTerm> </language> I want to index <languageTerm> when @type = "text", but not otherwise. Doable? Thanks, Greg Gregory Murray Digital Library Application Developer Princeton Theological Seminary _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
