Hi Blessing, I'm afraid you will have to filter that manually. You could push results into a map with page-id into a map:map, and skip doing that if there is already an entry in the map:map.
I have to admit that this XML doesn't make much sense to me.. Kind regards, Geert > -----Oorspronkelijk bericht----- > Van: [email protected] [mailto:general- > [email protected]] Namens Blessing N > Verzonden: dinsdag 12 november 2013 11:22 > Aan: MarkLogic Developer Discussion > Onderwerp: [MarkLogic Dev General] Distinct Attribute value Query > > I have documents stored in database in the following format > > <record id="245-012" > xmlns="http://marklogic.com/marklogic/schema/somenamespace"> > <page-list> > <page num="12"> > <page-content header="Header1" page-id="214"> > <author>Stanley</author> > <title>Some title</title> > </page-content> > </page> > <page num="18"> > <page-content header="Header5" page-id="285"> > <author>Bob</author> > <title>Some title</title> > </page-content> > </page> > <page num="23"> > <page-content header="Header1" page-id="214"> > <author>Smith</author> > <title>Some title</title> > </page-content> > </page> > <page num="28"> > <page-content header="Header9" page-id="296"> > <author>Jackson</author> > <title>Some title</title> > </page-content> > </page> > </page-list> > </record> > > These documents are fragmented based on the <page>. > Im using cts:element-attribute-value-query for the @page-id in > search:search. Though the @page-id value has duplicate values > (page-id="214"), the query returns it as two separate results. However > i want to fetch only distinct results based on @page-id. > > Is there any options available to accomplish this? Im using Marklogic 6. > > Regards, > Blessing. > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
