Thanks again Colleen,

On Fri, Dec 13, 2013 at 4:43 PM, Colleen Whitney <
[email protected]> wrote:

>  The default search grammar (tip:  use search:default-options() to see
> those) uses parentheses for grouping, e.g. "(cat AND dog) OR cow".  You've
> got square brackets, so those are being parsed as literals with your
> terms.  I don't see the brackets in the tutorial on a quick scan...but if
> you can tell me which section to look in, I'll see about getting that fixed.
>

Maybe Micha and yourself didn't intend for them to be taken literally, but
I did.  :-)
http://developer.marklogic.com/learn/2009-07-search-api-walkthrough

One other thing is that this walkthrough says that AND is the default but I
don't see taht; not yet anyway.


> And for quoted phrases (which I think might also be of interest to you
> here), by default you use double quotes, e.g. 'title:"The Sound and The
> Fury" or title:"As I Lay Dying"', but you can change that if you customize
> the grammar in your options.
>

Ahhh, now here is a problem I had.  I was including the constraint name
inside the quotes as well.

return search:search("data-name:Data da Coleta", $options)

This works much better:
return search:search('data-name:"Data da Coleta"', $options)

I did note though that reversing the single/double quotes doesn't return
any matches.  I found that a bit odd.
return search:search("data-name:'Data da Coleta'", $options)

But no big deal though.

Thanks for your prompt replies.

Cheers,
Tim
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to