<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Scott,<div><br></div><div>2 things can cause this:</div><div><br></div><div>1. Eventual consistency</div><div>The count service is an insanely high throughput service, while search is lower throughput - they have different backends, and a messaging bus keeps them in sync.  Because of this there is often a short period (up to 1 hr but normally < 5 mins) where they can differ during indexing runs.  Issues can creep in and they drift and occasionally we rebuild the count service.  The search service is always the correct one.</div><div><br></div><div>2. Geospatial issues</div><div>The isGeoreferenced only counts records with coordinates and no known geospatial issues - i.e. records we’d consider suitable for using the coordinates.</div><div><br></div><div>In this case it is 2. that provides the difference, and the search service should be using the &hasGeospatialIssue parameter.</div><div><br></div><div><a href="http://api.gbif.org/v1/occurrence/search?taxonKey=7264332&hasCoordinate=true&hasGeospatialIssue=false&limit=20">http://api.gbif.org/v1/occurrence/search?taxonKey=7264332&hasCoordinate=true&hasGeospatialIssue=false&limit=20</a></div><div><a href="http://api.gbif.org/v1/occurrence/count?taxonKey=7264332&isGeoreferenced=true">http://api.gbif.org/v1/occurrence/count?taxonKey=7264332&isGeoreferenced=true</a></div><div><br></div><div>Both report 4515 records.</div><div><br></div><div>I hope this helps - please feel free to quote me verbatim on the issue.</div><div><br></div><div>Cheers,</div><div>Tim</div><div><br><div><div>On 09 Apr 2015, at 07:40, Scott Chamberlain <<a href="mailto:myrmecocystus@gmail.com">myrmecocystus@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi, <div><br></div><div>A user of the R client we make for GBIF reports different number of occurrences for the /occurrence/search endpoint and the /occurrence/count endpoint with the same taxonkey, and limiting to georeferenced data only. See <a href="https://discuss.ropensci.org/t/rgbif-occ-count-and-occ-search-results-differ/174">https://discuss.ropensci.org/t/rgbif-occ-count-and-occ-search-results-differ/174</a> for the discussion. </div><div><br></div><div>I imagine there's a good explanation for this, but I'm not sure what it is right now.</div><div><br></div><div>Thanks! Scott</div></div>
_______________________________________________<br>API-users mailing list<br><a href="mailto:API-users@lists.gbif.org">API-users@lists.gbif.org</a><br>http://lists.gbif.org/mailman/listinfo/api-users<br></blockquote></div><br></div></body></html>