Note: You should also need to create lexicon for the 'name' field.
On Tue, Mar 1, 2011 at 7:23 PM, ambika arumugam
<[email protected]>wrote:
> Hi judie,
> I hope this query solves your purpose.
>
> cts:element-value-match(
> xs:QName("name"),
> "* distance)"
> )
>
> Regards
> Ambika
>
> On Tue, Mar 1, 2011 at 6:06 PM, judie pearline <[email protected]>wrote:
>
>> Hi all,
>> In our application we just wanted to return all the node values that ends
>> with distance.
>>
>> let $label:="* distance"
>> let $search := cts:search
>> (
>> collection("topics")/legal-topic,
>> cts:element-value-query(
>> xs:QName("name"),$label,("wildcarded","case-insensitive"))
>> )
>> return $search
>>
>> but the result contains
>> <name>Assured Distance </name>
>> <name>Distance Learning </name>
>> <name>Long Distance Services </name>
>> <name>Safe Distance Rule </name>
>> <name>long Distance Restrictions </name>
>>
>> When the input is "distance *", the same query returns only the nodes that
>> starts with distance.
>> Can anyone explain me why we are not getting the desired results (Ends
>> with distance alone) here and whats is the modification needed to get the
>> desired results?
>>
>> Regards,
>> Judy
>>
>>
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
>>
>>
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general