[MarkLogic Dev General] Indexing in MarkLogic for FasterSearches
tim at aaom.net
Thu Dec 16 10:12:13 PST 2010
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: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] 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
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.
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,
General mailing list
General at developer.marklogic.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the General