[MarkLogic Dev General] Building Facet UI

Mihir Das mihir.kumar999 at gmail.com
Mon May 13 21:28:13 PDT 2013


Hi,

Probably, you are looking for <return-results>false</return-results> option
to yield facets ONLY.

But it seems you are comparing facets value with XML file and re-creating a
new XML based on your business logic. I think there will be
some performance impact in comparison. Could you please describe more about
your requirement, specially in iteration part?

Cheers,
Mihir


> Message: 2
> Date: Mon, 13 May 2013 16:50:06 +0000
> From: "Singh, Gurbeer" <Gurbeer.Singh at morganstanley.com>
> Subject: [MarkLogic Dev General] Building Facet UI
> To: "general at developer.marklogic.com"
>         <general at developer.marklogic.com>
> Message-ID:
>         <884D75BBA01A514D8049AADB7E6C910817013419 at HZWEX2009N4.msad.ms.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi
>
> Need some suggestion to build UI from Facet
>
> I want to restructure my Facet UI code, just want to make sure I am taking
> right approach
>
> Search:search will give result + facet result
>
> I have a XML which contains all meta data of facet. XML file name is
> Taxonomy
>
> This algorithm I am planning to follow
>
>
> let $result:=search:search('policy', $config:OPTIONS,
> 1)/search:facet/search:facet-value
>
>                                 for $taxonomyItem in
> fn:doc($TAX_DOC)/taxonomy/taxonomyItem
> <div><B> $taxonomyItem/@name </B>
> <UL>
>
>       for $level1 in $taxonomyItem/level1
>
>                       if($result/@name eq $level1/@name) then (: compare
> result facet value text and XML file value TEXT:)
>
>                       <LI> $level1/@name   {xdmp:quote($result[@name eq
> $level1/@name]/@count)} (:Showing Facet value and count:)
>
>                                       if (fn:exists($level1/level2)) then
> <UL>
>
>                                                       for $level2 in
> $level1/level2
>
>
> if($result/@name eq $level2/@name) then
>
>
> <LI>$level2/@name  {xdmp:quote($result[@name eq $level2/@name]/@count)}
>  </LI> els()
> </UL> else()
> </LI>
> </UL>
> </DIV>
>
>
> ________________________________
>
> NOTICE: Morgan Stanley is not acting as a municipal advisor and the
> opinions or views contained herein are not intended to be, and do not
> constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall
> Street Reform and Consumer Protection Act. If you have received this
> communication in error, please destroy all electronic and paper copies and
> notify the sender immediately. Mistransmission is not intended to waive
> confidentiality or privilege. Morgan Stanley reserves the right, to the
> extent permitted under applicable law, to monitor electronic
> communications. This message is subject to terms available at the following
> link: http://www.morganstanley.com/disclaimers If you cannot access these
> links, please notify us by reply message and we will send the contents to
> you. By messaging with Morgan Stanley you consent to the foregoing.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://developer.marklogic.com/pipermail/general/attachments/20130513/3d04dc3f/attachment.html
>
> ------------------------------
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
>
> End of General Digest, Vol 107, Issue 28
> ****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20130514/e81168b1/attachment.html 


More information about the General mailing list