Thanks Colleen. You have got my question right. That was the best suggestion. I shall try out custom constraints for my requirement.
On 3/5/12, [email protected] <[email protected]> wrote: > Send General mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://developer.marklogic.com/mailman/listinfo/general > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of General digest..." > > > Today's Topics: > > 1. Search API - Partial Bucketing? (Vedavalli Radhika) > 2. Re: Search API - Partial Bucketing? (Colleen Whitney) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 4 Mar 2012 07:44:01 +0530 > From: Vedavalli Radhika <[email protected]> > Subject: [MarkLogic Dev General] Search API - Partial Bucketing? > To: General Mark Logic Developer Discussion > <[email protected]> > Message-ID: > <caj0uda0lkfvngmp-+u_fey7plncpytplwcya4uzdvnuqci8...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > All, > I have a requirement to group/bucket data which has the clientid > values lesser than and equal to count = 3 to a value called "Others" > and show the remaining values as such. > > Currently for the constraint clientid with both frequency-order and > ascending enabled in the facet-option, following is the facet > response. > Response 1: > <search:facet name="clientid"> > <search:facet-value name="Core Client" count="1">Core > Client</search:facet-value> > <search:facet-value name="egfh" count="1">egfh</search:facet-value> > <search:facet-value name="Client 05" count="3">Client > 05</search:facet-value> > <search:facet-value name="Client 03" count="5">Client > 03</search:facet-value> > <search:facet-value name="Smoke Test" count="6">Smoke > Test</search:facet-value> > <search:facet-value name="client39" > count="86">client39</search:facet-value> > <search:facet-value name="abcd" count="101">abcd</search:facet-value> > </search:facet> > > I am expecting something like below, where the values with count > lesser than and equal to 3 should be grouped to a facet value Others. > Response 2: > <search:facet name="clientid"> > <search:facet-value name="Others" count="5">Others</search:facet-value> > <search:facet-value name="Client 03" count="5">Client > 03</search:facet-value> > <search:facet-value name="Smoke Test" count="6">Smoke > Test</search:facet-value> > <search:facet-value name="client39" > count="86">client39</search:facet-value> > <search:facet-value name="abcd" count="101">abcd</search:facet-value> > </search:facet> > > I felt that bucketed range would not help in resolving the same. If I > have to bucket the complete resultset, then buckets might help. But I > just want a portion of the data to be bucketed. > > I can do post processing of the response and formulate what is > requried. However, sorting would become tedious. It would be helpful, if > it is part of the constraints/facets. > > Any thoughts? > > Radhika. > > > ------------------------------ > > Message: 2 > Date: Sun, 4 Mar 2012 09:58:37 -0800 > From: Colleen Whitney <[email protected]> > Subject: Re: [MarkLogic Dev General] Search API - Partial Bucketing? > To: MarkLogic Developer Discussion <[email protected]> > Cc: General Mark Logic Developer Discussion > <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset="us-ascii" > > Radhika, let me see if I understand what you are trying to do. > > You want to group item values at one end of a range in a bucket, but use > actual values for the rest of the range? > > The Search API doesn't do that out of the box. Depending on the size of your > dataset and how much control you have over the data, you could consider > writing a custom facet to produce the results you want, doing > post-processing, or enriching your documents so that values can be grouped > the way you want them. > > If I've misunderstood the problem, please include the options node you're > using, because that might help make the problem clearer. > > > Sent from my iPhone > > On Mar 3, 2012, at 6:12 PM, "Vedavalli Radhika" <[email protected]> > wrote: > >> All, >> I have a requirement to group/bucket data which has the clientid >> values lesser than and equal to count = 3 to a value called "Others" >> and show the remaining values as such. >> >> Currently for the constraint clientid with both frequency-order and >> ascending enabled in the facet-option, following is the facet >> response. >> Response 1: >> <search:facet name="clientid"> >> <search:facet-value name="Core Client" count="1">Core >> Client</search:facet-value> >> <search:facet-value name="egfh" count="1">egfh</search:facet-value> >> <search:facet-value name="Client 05" count="3">Client >> 05</search:facet-value> >> <search:facet-value name="Client 03" count="5">Client >> 03</search:facet-value> >> <search:facet-value name="Smoke Test" count="6">Smoke >> Test</search:facet-value> >> <search:facet-value name="client39" >> count="86">client39</search:facet-value> >> <search:facet-value name="abcd" count="101">abcd</search:facet-value> >> </search:facet> >> >> I am expecting something like below, where the values with count >> lesser than and equal to 3 should be grouped to a facet value Others. >> Response 2: >> <search:facet name="clientid"> >> <search:facet-value name="Others" count="5">Others</search:facet-value> >> <search:facet-value name="Client 03" count="5">Client >> 03</search:facet-value> >> <search:facet-value name="Smoke Test" count="6">Smoke >> Test</search:facet-value> >> <search:facet-value name="client39" >> count="86">client39</search:facet-value> >> <search:facet-value name="abcd" count="101">abcd</search:facet-value> >> </search:facet> >> >> I felt that bucketed range would not help in resolving the same. If I >> have to bucket the complete resultset, then buckets might help. But I >> just want a portion of the data to be bucketed. >> >> I can do post processing of the response and formulate what is >> requried. However, sorting would become tedious. It would be helpful, if >> it is part of the constraints/facets. >> >> Any thoughts? >> >> Radhika. >> _______________________________________________ >> General mailing list >> [email protected] >> http://developer.marklogic.com/mailman/listinfo/general > > > ------------------------------ > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > > End of General Digest, Vol 93, Issue 6 > ************************************** > _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
