[MarkLogic Dev General] lib-search module and facets
Alan Darnell
alan.darnell at utoronto.ca
Tue Jun 17 08:08:28 PDT 2008
Chris,
Thanks for this -- I missed the namespace declaration at the head of
the facet-defs.xml example file. Frank, thanks for your suggestion
too -- I will give the scope id approach a try too.
Alan
On Jun 17, 2008, at 12:15 AM, Christopher Welch wrote:
> Hi Alan,
>
> Writing from the "love/hate namespaces dept," it doesn't appear in
> your
> example that there are any namespaces on your facet-def elements. Try
> search:facet-defs, etc.
>
> Hope this helps!
> Chris
>
> -----Original Message-----
> From: general-bounces at developer.marklogic.com
> [mailto:general-bounces at developer.marklogic.com] On Behalf Of Alan
> Darnell
> Sent: Monday, June 16, 2008 8:01 PM
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] lib-search module and facets
>
> Working my way through hooking up the Versi template modules with the
> excellent lib-search modules and I'm running into a wall trying to
> generate facet values. I have a range index on an element called
> kwd. There is no namespace other than the default namespace
> associated with that element So I try the following, and though I get
> back search results, I don't get any facet values. I'm thinking I'm
> missing something really basic but can't figure it out from the
> documentation. Any help would be appreciated.
>
> Alan
>
> ----
>
> import module namespace
> search="http://www.marklogic.com/ps/lib/lib-search
> " at "modules/lib-search.xqy"
> import module "http://www.marklogic.com/ps/lib/lib-search" at
> "modules/
> lib-search-custom.xqy"
>
>
> search:search-summary(
> <search:search-criteria>
> <search:term>
> <search:text>
> water
> </search:text>
> </search:term>
> <facet-defs>
> <facet-def do-count="true">
> <value-facet>
> <element>
> <namespace></namespace>
> <local-name>kwd</local-name>
> </element>
> <top>10</top>
> </value-facet>
> </facet-def>
> </facet-defs>
> </search:search-criteria>
> ,1,10)
>
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
More information about the General
mailing list