[Developers] Limiting mql results by count

James Taylor jame0taylor at gmail.com
Tue Apr 21 02:18:19 UTC 2009


Hi,
I'm wondering if anyone knows how to limit results by properties that return
a specific number of results.  For example, I want to find all of the
'science_or_technology_company' topics that have 0,1,or 2
'develops_treatments_for_disease' properties.

Using the count directive, I'm able to find out how many such properties
exist for each topic:

[
  {

"/base/bioventurist/science_or_technology_company/develops_treatments_for_disease"
: [
      {
        "count" : null,
        "name" : null
      }
    ],
    "guid" : null,
    "name" : null,
    "type" : "/base/bioventurist/science_or_technology_company"
  }
]

However, trying to use the count to limit results does not seem to work:

[
  {

"/base/bioventurist/science_or_technology_company/develops_treatments_for_disease"
: [
      {
        "count" : 1,
        "name" : null
      }
    ],
    "guid" : null,
    "name" : null,
    "type" : "/base/bioventurist/science_or_technology_company"
  }
]

Returns the error message:         "message" : "'count' directive must be
null",

Thanks in advance!
-JT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20090420/ae5d7249/attachment.htm 


More information about the Developers mailing list