Concatenating results is not idea. Is there a way to solve this in a single query by combining the 'pattern matching' operator and the 'one of' operator?<br><br>Something like (which doesn't work):<br>
[<br> {<br> "name" : null,<br> "name|=" : [<br> "^0*",<br> "^1*",<br> "^2*"<br> ],<br> "type" : "/base/bioventurist/science_or_technology_company"<br>
}<br>]<br><br>-JT<br><br><div class="gmail_quote">On Sat, Jan 3, 2009 at 2:37 PM, Kurt Bollacker <span dir="ltr"><<a href="mailto:kurt@metaweb.com">kurt@metaweb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Your query is simply the logical intersection of the name constraints,<br>
rather than the union ("OR") that you wanted. You could write each of<br>
your 10 queries like:<br>
<br>
[<br>
{<br>
"a:name~=" : "^0*",<br>
<div class="Ih2E3d"> "name" : null,<br>
"type" : "/base/bioventurist/science_or_technology_company"<br>
}<br>
]<br>
<br>
</div>and concatenate the results. Currently, MQL pattern matching does not<br>
have a "full set" of regular expressions.<br>
<br>
<br>
Kurt :-)<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
On Sat, Jan 03, 2009 at 02:06:43PM -0800, Rob Warren wrote:<br>
> Hi,<br>
><br>
> I was wondering if anybody has any experience using multiple wildcards<br>
> within a single MQL query?<br>
><br>
> I am trying to write a single query that returns all names that begin with a<br>
> number for a given type (e.g. for "type" :<br>
> "/base/bioventurist/science_or_technology_company", I want freebase to<br>
> return 3M, 454 Life Sciences, 23andme etc.).<br>
><br>
> I have tried using property prefixes such as in the example below and not<br>
> had any luck.<br>
><br>
> [<br>
> {<br>
> "a:name~=" : "^0*",<br>
> "b:name~=" : "^1*",<br>
> "c:name~=" : "^2*",<br>
> "d:name~=" : "^3*",<br>
> "e:name~=" : "^4*",<br>
> "f:name~=" : "^5*",<br>
> "g:name~=" : "^6*",<br>
> "h:name~=" : "^7*",<br>
> "i:name~=" : "^8*",<br>
> "j:name~=" : "^9*",<br>
> "name" : null,<br>
> "type" : "/base/bioventurist/science_or_technology_company"<br>
> }<br>
> ]<br>
><br>
> I am unsure as to how to combine wildcards and either numeric comparisons<br>
> "one of" operators and am not sure if this is even an effective solution.<br>
><br>
> Any suggestions or help would be much appreciated.<br>
<br>
</div></div>> _______________________________________________<br>
> Developers mailing list<br>
> <a href="mailto:Developers@freebase.com">Developers@freebase.com</a><br>
> <a href="http://lists.freebase.com/mailman/listinfo/developers" target="_blank">http://lists.freebase.com/mailman/listinfo/developers</a><br>
<br>
_______________________________________________<br>
Developers mailing list<br>
<a href="mailto:Developers@freebase.com">Developers@freebase.com</a><br>
<a href="http://lists.freebase.com/mailman/listinfo/developers" target="_blank">http://lists.freebase.com/mailman/listinfo/developers</a><br>
</blockquote></div><br>