Hi Justin,

To expand on the idea, why not allow something like this too:

<constraint name="test">
   <word>
     <element ns="aa" name="bb"/>
     <attribute ns="" name="Amount"/>
   </word>
   <value>
     <element ns="xx" name="yy"/>
     <attribute ns="" name="Amount"/>
   </value>
</constraint>

If I understand the search:search library well enough this just gets
translated to some cts:query construct. That query is passed in as
parameter for search estimates to get facet counts. Evan showed nice but
quite lengthy code just to do an OR on two fields. I think the
search:search library could do that automatically as well..

WDYT? :-)

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van: [email protected]
[mailto:[email protected]] Namens Justin Makeig
Verzonden: vrijdag 11 november 2011 0:49
Aan: General MarkLogic Developer Discussion
Onderwerp: Re: [MarkLogic Dev General] About "Multiple constraints with
same constraint name, different namespaces"..

Geert,
This is something we're looking at. Thanks for the heads-up. Feedback is
always appreciated.

Justin


Justin Makeig
Senior Product Manager
MarkLogic Corporation
[email protected]
www.marklogic.com

On Nov 10, 2011, at 12:56 PM, Geert Josten wrote:

> Hi,
>
> Someone on stackoverflow
>
(http://stackoverflow.com/questions/8080424/multiple-constraints-with-same
> -constraint-name-different-namespaces) asks how the make search:search
> look at same attribute of two different element within same constraint.
> (at least that is how I interpret the question)
>
> It strikes me that the cts functions allow multiple xs:QName to be
passed
> it, but the search:search constraint definitions don't. Why not allow
> something like this? Can't be too difficult to implement:
>
> search:search("test:xxx", <options
> xmlns="http://marklogic.com/appservices/search";>
> <constraint name="test">
>    <word>
>      <element ns="aa" name="bb"/>
>      <attribute ns="" name="Amount"/>
>    </word>
>    <word>
>      <element ns="xx" name="yy"/>
>      <attribute ns="" name="Amount"/>
>    </word>
> </constraint>
>
> </options>)
>
> Kind regards,
> Geert
>
> drs. G.P.H. (Geert) Josten
> Senior Developer
>
>
>
> Dayon B.V.
> Delftechpark 37b
> 2628 XJ Delft
>
> T +31 (0)88 26 82 570
> M +31 (0)6 5438 1359
>
> [email protected]
> www.dayon.nl
>
> De informatie - verzonden in of met dit e-mailbericht - is afkomstig van
> Dayon BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit
> bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen.
Aan
> dit bericht kunnen geen rechten worden ontleend.
> _______________________________________________
> 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

Reply via email to