Hi Silvano, I got it.
Thanks, Helen On Jul 22, 2010, at 1:19 PM, Silvano Ravotto wrote: > Helen, > > I added the facet-option by mistake. This will be only used when computing > the facets (i.e. running cts:element-values) but not for to actually building > the cts:element-range-query for the search. > > So it is best to add the collation attribute in the range element. > > Sorry for the confusion. > > Silvano > > > From: [email protected] > [mailto:[email protected]] On Behalf Of helen chen > Sent: Thursday, July 22, 2010 12:28 PM > To: General Mark Logic Developer Discussion > Subject: Re: [MarkLogic Dev General] question about search:search constraint > > I also tried Silvano's example, if I just use > facet-option>collation=http://marklogic.com/collation/en/MO</facet-option>, > it also work. > > I guess I have to combine the document for search:search and > cts:element-values and just try it. > > Thanks for the help, > > Helen > > > On Jul 22, 2010, at 12:16 PM, Shannon wrote: > > > Albeit, the API doc isn't clear that you can specify a collation on a range, > although it can be inferred from the <suggestion-source> example and > search:suggest examples. But it probably should be mentioned in the <range> > definition in the search:search section. > > On Jul 22, 2010, at 12:03 PM, helen chen wrote: > > > Hi Silvano and Shannon, > > I tried them and they work. Does anyone know where I can get a full document > of search:search? It will help me learning it. > > Thanks, Helen > > > On Jul 22, 2010, at 11:44 AM, Silvano Ravotto wrote: > > > Sorry – cut and paste error: > > <options xmlns="http://marklogic.com/appservices/search"> > <constraint name="codencount"> > <range type="xs:string" facet="true" > collation="http://marklogic.com/collation/en/MO"> > <facet-option>collation=a</facet-option> > <element ns="metasearch" name="meta-article-coden" /> > </range> > </constraint> > </options> > > > > > From: [email protected] > [mailto:[email protected]] On Behalf Of Silvano Ravotto > Sent: Thursday, July 22, 2010 11:43 AM > To: General Mark Logic Developer Discussion > Subject: Re: [MarkLogic Dev General] question about search:search constraint > > Helen, > > You can specify the collation as an attribute of the range element: > > <options xmlns="http://marklogic.com/appservices/search"> > <constraint name="codencount"> > <range type="xs:string" facet="true" > collation="http://marklogic.com/collation/en/MO"> > <facet-option>collation=a</facet-option> > <element ns="metasearch" name="meta-article-coden" /> > </range> > </constraint> > </options> > > Silvano > > From: [email protected] > [mailto:[email protected]] On Behalf Of helen chen > Sent: Thursday, July 22, 2010 11:30 AM > To: General Mark Logic Developer Discussion > Subject: [MarkLogic Dev General] question about search:search constraint > > I'm learning marklogic search, I want to create a range constraint so I can > get the facet. The problem is: the element range index is created using the > collation "http://marklogic.com/collation/en/MO", not the default collation > in search:search. > > so when I create constraint like the following: > <constraint name="codencount"> > <range type="xs:string" facet="true"> > <facet-option>limit=10</facet-option> > <element ns="metasearch" name="meta-article-coden"/> > </range> > </constraint> > > there is no place for me to specify the collation, and I got error > Description: XDMP-ELEMRIDXNOTFOUND: cts:element-values(fn:QName("metasearch", > "meta-article-coden"), (), ("type=string", "limit=10", "concurrent"), > cts:word-query("perovskite-type", ("case-insensitive","lang=en"), 1), > xs:double("1"), ()) -- No string element range index for > fn:QName("metasearch", "meta-article-coden") http://marklogic.com/collation/ > > > I looked at the search:search API, it didn't list anything for range > constraint to specify the collation. > > Does anyone know how I can do it? > > Thanks, Helen > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
