Thanks for pointing that out Greg, we'll try and clarify the docs for this.

-Danny

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Murray, Gregory
Sent: Tuesday, July 17, 2012 5:41 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] term-option within constraint

Thanks, Colleen! If someone could fix the documentation that would be great.

On Jul 16, 2012, at 4:15 PM, Colleen Whitney wrote:

> Greg, it should be a child of <word>.
> 
> ________________________________________
> From: [email protected] 
> [[email protected]] On Behalf Of Murray, Gregory 
> [[email protected]]
> Sent: Monday, July 16, 2012 1:10 PM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] term-option within constraint
> 
> Will,
> 
> Thanks for the idea, but that doesn't work either. The schema doesn't allow 
> <term> as a child of <constraint> either:
> 
> Invalid node: Found search:term but expected 
> (search:constraint-type|search:annotation)* at 
> /search:options/search:constraint[1]/search:term using schema "search.xsd"
> 
> Thanks,
> Greg
> 
> 
> On Jul 16, 2012, at 4:07 PM, Will Thompson wrote:
> 
>> I think <term-option> needs to be a child of <term> - try wrapping them and 
>> see if that works.
>> 
>> -Will
>> 
>> -----Original Message-----
>> From: [email protected] 
>> [mailto:[email protected]] On Behalf Of Murray, Gregory
>> Sent: Monday, July 16, 2012 12:36 PM
>> To: MarkLogic Developer Discussion
>> Subject: [MarkLogic Dev General] term-option within constraint
>> 
>> Hello,
>> 
>> I need to apply options such as "case-insensitive" to a search constraint 
>> using the Search API. The documentation for search:search() states that "You 
>> can use term-option elements as a child of either the term element or as a 
>> child of the constraint element."
>> 
>> http://developer.marklogic.com/pubs/5.0/apidocs/SearchAPI.html#term-option
>> 
>> But when I add <term-option> as a child of <constraint> like so:
>> 
>> <constraint name="title">
>>   <word>
>>     <element ns="http://digital.library.ptsem.edu/ia"; name="title"/>
>>   </word>
>>   <term-option>case-insensitive</term-option>
>>   <term-option>diacritic-insensitive</term-option>
>> </constraint>
>> 
>> and then run the <options> node through search:check-options() I'm told that 
>> <term-option> *cannot* be a child of <constraint>:
>> 
>> Invalid node: Found search:term-option but expected 
>> (search:constraint-type|search:annotation)* at 
>> /search:options/search:constraint[1]/search:term-option[1] using schema 
>> "search.xsd"
>> 
>> Can anyone clarify how to apply "case-insensitive", etc. to a constraint?
>> 
>> Thanks,
>> Greg
>> 
>> Gregory Murray
>> Digital Library Application Developer
>> Princeton Theological Seminary
>> 
>> _______________________________________________
>> 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
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to