> each document that matches will be retrieved and scanned through to find the
> matches
It means that indexes refer to documents, not to concrete tags in the
documents. And each time MarkLogic scans documents (if we drop cache). It's
correct?
For example. If I have two expressions
First - fn:collection()//ns1:itemX
Second -
fn:collection()/ns1:root/ns1:lavel1/ns1:level2/ns1:level3/ns1:itemX
The second expression will be more faster if each document contains a lot of
different tags? (because MarkLogic needs time for scan all tags in the document)
Thanks,
Andrey
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Damon Feldman
Sent: Monday, September 23, 2013 5:16 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] full search or not
Andrey,
Yes, it will find that element wherever it exists in XML documents in the
database. All XML structure is always indexed in MarkLogic at the document
level, so the indexes can tell MarkLogic Server which documents contain
ns1:item at all. To find every element within those documents, each document
that matches will be retrieved and scanned through to find the matches.
Adding indexes in MarkLogic is somewhat different from adding indexes in other
systems because there are these two kinds of indexes: the Universal Index which
is always on, and Range Indexes (a form of lexicon) which is explicitly defined
per element. Range indexes are usually for fast sorting, facets and other
operations beyond normal searching, so you can search for XML structures, words
and the like without any special index settings and it will be quite fast.
Note that searching for every value in a database can return huge amounts of
data, however, so you may need to use another technique to limit the results.
Yours,
Damon
--
Damon Feldman
MarkLogic Corporation
www.marklogic.com
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ganyushkin,
Andrey - Moscow
Sent: Monday, September 23, 2013 3:54 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] full search or not
Hi All,
If I use the following expression
//ns1:item
It's mean that ML scan all items (all tags and sub tags) in the my DB or not?
and if I put ns1:item in DB index, could this speed up the query?
Please explain it to me.
Thanks,
Andrey
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general