Since the range query takes advantage of a range index, does it treat the cts:search as if it were unfiltered, i.e. is a fragment root required on the root node of the search?
_____ From: [email protected] [mailto:[email protected]] On Behalf Of Jason Hunter Sent: Thursday, December 16, 2010 12:54 PM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Indexing in MarkLogic for FasterSearches To do an exact element value match, you can do a range query using "=" as a comparator, or a cts:element-value-query with the "exact" parameter. The first uses a range index to resolve it; the latter uses a term list. The range index you have to configure by the QName; the term list is always present. The range index can compare using a collation; the term list for "exact" is just a codepoint comparison. To do a search-style match (i.e. ignoring whitespace, punctuation, case, diacritics, etc) you'll want to use cts:element-value-query and pass the appropriate parameters on what should and shouldn't be sensitive. It'll then resolve using term lists. -jh- On Dec 16, 2010, at 9:47 AM, Tim Meagher wrote: I understand the usefulness of range indexes in MarkLogic for getting a unique & searchable list of values for an indexed element using lexicon searches, but I'm not sure I understand the benefit of indexing for non-lexicon searches using cts:search and cts:contains. For example, to perform a cts:search on a particular title value, is setting a range index on the title element sufficient to improve performance? Thanks ahead of time, Tim Meagher _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
