<p>The logic <em>should be</em>, although it's always possible that there are bugs, that changesets are time ranges; a changeset may contain edits with timestamps between its <code>created_at</code> and <code>closed_at</code> times. The query window is <em>also</em> a time range, and the purpose of that clause was to find changesets overlapping the query window, so we need to test the maximum extent of the changeset time range, <code>closed_at</code>, against the minimum extent of the query window, <code>from</code>, and the minimum extent of the changeset time range, <code>created_at</code>, against the maximum extent of the query window, <code>to</code>.</p>
<p>As an example, consider:</p>
<ol>
<li>Changeset 1, created at 1pm and closed at 2pm,</li>
<li>Changeset 2, created at 3pm and closed at 4pm.</li>
</ol>
<p>Let's imagine we want to query for all changesets which might have been active between 1:30pm and 3:30pm, then we need to include both changesets 1 & 2.</p>
<p>All that being said, last time I checked usage stats, the changesets query API was hardly used. Partly, I suppose, because it was always a bit slow. But mainly that querying changesets rather than changes has turned out to be of limited usefulness. Instead we've got systems like overpass and OWL<sup>†</sup>, which query the changes directly. I think the changesets query API is a good candidate for removal at the next API revision.</p>
<p>†: for some values of "got".</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/openstreetmap/openstreetmap-website/issues/1204#issuecomment-210848882">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLfmpUaaT75hELLh4iJn7xn_OjVFPks5p4QvXgaJpZM4II8ok.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/issues/1204#issuecomment-210848882"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>