[MarkLogic Dev General] Search results puzzle
jeni at jenitennison.com
Sat Dec 11 13:26:23 PST 2010
I have a problem using the cts:search() facility.
I am looking for documents that (a) contain a ukm:Year element whose
Value attribute is 1985 and (b) contain a leg:P1group element with a
RestrictExtent attribute whose value is 'E+W'.
If I do:
"Value"), "=", 1985),
QName("", "RestrictExtent"), "E+W")
I get back a single document (1985 c. 12).
If I do what I think is the equivalent query:
)[.//ukm:Year/@Value = 1985]/base-uri(.)
I get back two documents (1985 c. 12 and 1985 c. 67; actually multiple
copies of the second because it's an unfiltered search and the relevant
document contains several matching P1groups).
So two questions:
1. Why is the first query not giving me back the same results as the
second query? Is this to do with fragments or something?
2. What would be the most efficient way of performing this search while
retaining the accurate results given by the second of the above expressions?
P.S. MarkLogic v. 4.1-7
More information about the General