[Developers] Multiple Wildcards in MQL Query
Kurt Bollacker
kurt at metaweb.com
Sat Jan 3 22:37:18 UTC 2009
Your query is simply the logical intersection of the name constraints,
rather than the union ("OR") that you wanted. You could write each of
your 10 queries like:
[
{
"a:name~=" : "^0*",
"name" : null,
"type" : "/base/bioventurist/science_or_technology_company"
}
]
and concatenate the results. Currently, MQL pattern matching does not
have a "full set" of regular expressions.
Kurt :-)
On Sat, Jan 03, 2009 at 02:06:43PM -0800, Rob Warren wrote:
> Hi,
>
> I was wondering if anybody has any experience using multiple wildcards
> within a single MQL query?
>
> I am trying to write a single query that returns all names that begin with a
> number for a given type (e.g. for "type" :
> "/base/bioventurist/science_or_technology_company", I want freebase to
> return 3M, 454 Life Sciences, 23andme etc.).
>
> I have tried using property prefixes such as in the example below and not
> had any luck.
>
> [
> {
> "a:name~=" : "^0*",
> "b:name~=" : "^1*",
> "c:name~=" : "^2*",
> "d:name~=" : "^3*",
> "e:name~=" : "^4*",
> "f:name~=" : "^5*",
> "g:name~=" : "^6*",
> "h:name~=" : "^7*",
> "i:name~=" : "^8*",
> "j:name~=" : "^9*",
> "name" : null,
> "type" : "/base/bioventurist/science_or_technology_company"
> }
> ]
>
> I am unsure as to how to combine wildcards and either numeric comparisons
> "one of" operators and am not sure if this is even an effective solution.
>
> Any suggestions or help would be much appreciated.
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
More information about the Developers
mailing list