ldodds / pho-reconcile

Implementation of Gridworks reconciliation API
http://ldodds.com/gridworks/
7 stars 0 forks source link

Limit attribute should apply post property search #13

Open JeniT opened 14 years ago

JeniT commented 14 years ago

The request:

{
  "query":"Sacred%20Heart%20RC%20Primary%20School",
  "limit":"20",
  "type":"http://education.data.gov.uk/def/school/School",
  "properties":[{
    "p":"LAD%20URI",
    "v":"http://statistics.data.gov.uk/id/local-authority-district/00EB",
    "pid":"http://education.data.gov.uk/def/school/districtAdministrative"
  }]
}

succeeds, coming back with a single result, whereas changing the 'limit' to '5' fails.

It looks as though the limit is applying to the initial search (on text+type) rather than to the number of results returned by the search after filtering based on the property, and therefore we're not getting matches when we really should.

ldodds commented 14 years ago

Yes thats right, in my first pass I'm just using the Platform features and then filtering properties locally.

I can improve this in two ways: