Hi,
We have clarification on MarkLogic queries below, Could you please help on this.
Problem Statement:- Upon firing search in ML, XQY brings back all records (UID
- Unique ID) with matching search criteria. Now we need to group this search
results to a predefined tree structure (stored as XML in ML) in a way that
UID's belonging to certain categories will be grouped under Category A, B, C...
and those which do not match are grouped under OTHERS category.
We are trying to get the mismatch id's count and from the search result where
the Id's will present in the different xml's. The below query used for
element-attribute-value-query condition with the cts:not-query. but we are
unable to get the expected result.
Could you suggest me any other approach there in ML search to get it mismatch
id's count.
Search Query Condition
cts:not-query((
cts:element-attribute-value-query(
xs:QName("docinfo:metaitem"),
xs:QName("name"),
"hierlev-id"
),
cts:element-attribute-value-query(
xs:QName("docinfo:metaitem"),
xs:QName("value"),
$IdsOthers
)
))
Sample XML,
<docinfo:hierlev role="me" id="abc:taxo#_672347">
<heading>
<title>abc</title>
</heading>
</docinfo:hierlev>
<docinfo:hierlev role="me" id="abc:taxo#_672348">
<heading>
<title>def</title>
</heading>
</docinfo:hierlev>
<docinfo:hierlev role="me" id="abc:taxo#_672349">
<heading>
<title>ghi</title>
</heading>
</docinfo:hierlev>
<docinfo:hierlev role="me" id="abc:taxo#_672350">
<heading>
<title>jkl</title>
</heading>
</docinfo:hierlev>
<docinfo:hierlev role="me" id="abc:taxo#_672351">
<heading>
<title>mno</title>
</heading>
</docinfo:hierlev>
Search Result Sample XML Id present
the below values are presents in the different xml. We need validate against
above sample xml,
1. <docinfo:metaitem name="hierlev-id" value="abc:taxo#_673349"/>
2. <docinfo:metaitem name="hierlev-id" value="abc:taxo#_674349"/>
3. <docinfo:metaitem name="hierlev-id" value="abc:taxo#_674349"/>
Also we have created "Attribute Range Index" . but still we are not getting the
mismatch count id's.
Regards,
Mohanraj
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are
not
to copy, disclose, or distribute this e-mail or its contents to any other
person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has
taken
every reasonable precaution to minimize this risk, but is not liable for any
damage
you may sustain as a result of any virus in this e-mail. You should carry out
your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this
e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general