Hi All, The problem seems to be with the values that I am passing in query those values have some duplicacy so, *cts:value-co-occurrences()* seems to be working fine. Thanks to all of you for your suggestions.
Thanks and Regards, Shabana Khan LinkedIn <https://in.linkedin.com/pub/shabana-khan/40/229/454> On Wed, Nov 29, 2017 at 3:30 AM, Christopher Hamlin <[email protected]> wrote: > Yeah, TDE is a great suggestion if you you are on 9. > > You can control extraction context, and so keep separate the kind of > "repeating rows" that can be difficult with tuples. > > For example see: http://docs.marklogic.com/guide/app-dev/TDE#id_71415 > > On Tue, Nov 28, 2017 at 4:02 PM, Erik Hennum <[email protected]> > wrote: > > Hi, Shabana: > > > > If you are on MarkLogic 9, you might consider using TDE to project the > rows you want from the documents. > > You can then use the Optic API to retrieve rows from documents qualified > by a cts.query(). > > > > Erik Hennum > > > > > > > > ________________________________________ > > From: [email protected] < > [email protected]> on behalf of Christopher Hamlin < > [email protected]> > > Sent: Tuesday, November 28, 2017 8:05:14 AM > > To: MarkLogic Developer Discussion > > Subject: Re: [MarkLogic Dev General] Regarding limiting no of > co-occurrences returned. > > > > You'll get tuples for the cross product over the document (that is, > > the co-occurrences within the whole document). > > > > So, is it the case that you have more than one occurrence of the two > > values you are returning, in the same document? > > > > If so, sometimes you can do some work by using the 'proximity' and > > 'ordered' options. > > > > The query you pass restricts the fragments. Unless you have > > fragmentation, this equates to co-occurrences across all documents > > matching the query. > > > > /ch > > > > On Tue, Nov 28, 2017 at 7:53 AM, shabana khan <[email protected]> > wrote: > >> Hi All, > >> > >> I am using cts:value-co-occurrences() for fetching pair of values for > data > >> set in my project.I have a query too for restricting resultant pair only > >> from specific section. > >> But the problem I am facing is that duplicate results are being > returned for > >> each occurrence of values. > >> Basically, I am looking for a way by which each pair of value should > occur > >> only once in result. I looked at the available options and tried using > >> "limit=N" but that seems to have no effect on this. > >> Filtering at later stage is not possible since it slows down the query > if I > >> go for selecting unique records based on some value. > >> > >> Is there some way to achieve it. If anyone has faced this problem > please do > >> share what you did exactly to get unique pair of values. > >> Any heads-up will be appreciated. > >> > >> Thanks and Regards, > >> Shabana Khan > >> LinkedIn > >> > >> > >> > >> > >> _______________________________________________ > >> General mailing list > >> [email protected] > >> Manage your subscription at: > >> http://developer.marklogic.com/mailman/listinfo/general > >> > > _______________________________________________ > > General mailing list > > [email protected] > > Manage your subscription at: > > http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > > General mailing list > > [email protected] > > Manage your subscription at: > > http://developer.marklogic.com/mailman/listinfo/general > _______________________________________________ > General mailing list > [email protected] > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general >
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
