[Developers] pattern-matching syntax for =~ constraint in MQL
David Flanagan
david at davidflanagan.com
Wed Apr 23 23:38:09 UTC 2008
Christine Weibel wrote:
> ah. got it.
>
> {
> "q1" : {
> "query" : [
> {
> "a:name" : {
> "optional" : "forbidden",
> "value~=" : "\"love you\""
> },
> "b:name~=" : "love",
> "c:name~=" : "you",
> "name" : null,
> "type" : "/common/topic"
> }
> ]
> }
> }
>
> bug filed.
Ian: since you posed this question you should note that
optional:forbidden is not currently documented, either, but I'm working
on it. It is probably clear from the context here what it does.
Christine: I had already updated my version of the docs to match the
current behavior. I'll revert them. I don't think I've got access to
the bug database (its not public, is it?)... So just to be clear, the
desired behavior is that patterns always indicate phrases, and no
escaped quotes are necessary. To match multiple words that do not form a
phrase, we should use ~= multiple times, right?
David
> ----- Original Message -----
> From: "John Giannandrea" <jg at metaweb.com>
> To: "For discussions about MQL, Freebase API and apps built on Freebase" <developers at freebase.com>
> Sent: Tuesday, April 22, 2008 9:51:21 PM (GMT-0800) America/Los_Angeles
> Subject: Re: [Developers] pattern-matching syntax for =~ constraint in MQL
>
>
> As David has discovered, you have to embed quotes in the string, as
> in "value~=" : "\"love you\""
> I think this is a bug in MQL and should get fixed.
>
> -jg
>
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>
More information about the Developers
mailing list