Wow...I thought I had tried that and it didn't work. I will now wallow in
my shame. Thank you David and Michael for the help!

Harry


On Tue, Nov 19, 2013 at 8:34 AM, David Lee <[email protected]> wrote:

>  try a cts:element-value-query instead of a cts:word-query
>
>
>
> http://docs.marklogic.com/cts:element-value-query
>
>
>
> Use "Banana *" ... should do the trick
>
>
>
> (note the space)
>
>
>
>
>
>
> -----------------------------------------------------------------------------
>
> David Lee
> Lead Engineer
> MarkLogic Corporation
> [email protected]
> Phone: +1 812-482-5224
>
> Cell:  +1 812-630-7622
> www.marklogic.com
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Harry B.
> *Sent:* Tuesday, November 19, 2013 8:41 AM
> *To:* General MarkLogic Developer Discussion
> *Subject:* [MarkLogic Dev General] Searching for keyword at the beginning
> of a string
>
>
>
> Seems I am overlooking an obvious solution, but I have been spinning my
> wheels and need help.
>
> Let's say I have a document for each of a number of songs. I want to
> search the titles to find those that start with the keyword. For example,
>
> <title>30,000 Pounds Of Bananas</title>
> <title>Banana Boat Song</title>
>
> Keyword *banana* will find both with wildcarded cts:word-query. I need to
> search for banana* and return only Banana Boat Song, but both come back, of
> course.
>
> What am I overlooking?
>
>
> _______________________________________________
> 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