Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Sort Order is Confusing and Surprising to Some #31

Closed
jordan2175 opened this issue Jan 5, 2018 · 4 comments
Closed

Object Sort Order is Confusing and Surprising to Some #31

jordan2175 opened this issue Jan 5, 2018 · 4 comments

Comments

@jordan2175
Copy link

In the document we need to add a lot more clarity around what content is returned based on what type of query. My proposal would be:

  1. If there are is no added_after or added_before like filter than the results should be the newest ones in the collections sorted in reverse order (not sure on the sort order). Meaning, if you have 100 records, 0-99, and you limit the results to 10 records. You should get records 99-90 or 90-99 depending on which sort order we decide on.

  2. If you have an added_after or added_before then it should just start at these points. I am once again, not 100% sure on the sort order for each of these. But we should be consistent as much as possible so that a client can have a predictable interaction with the server.

@jordan2175
Copy link
Author

jordan2175 commented Feb 1, 2018

We discussed this at the F2F and decided that it would be the oldest records first. We need to add some clarifying text to help implementers understand this.

@jordan2175 jordan2175 changed the title More clarity is needed about content returned Object Sort Order is Confusing and Surprising to Some Feb 5, 2018
@jordan2175
Copy link
Author

jordan2175 commented Feb 22, 2018

I added this text to section 3.4 in the added_after table row.

If no added_after parameter is provided, the server MUST return the oldest records first.

Not sure if this is the best text for it or not.

@jordan2175 jordan2175 added this to the TAXII-2.1-CSD01 milestone Feb 22, 2018
@jordan2175 jordan2175 added this to In progress in TAXII-2.1 Feb 22, 2018
@johnwunder
Copy link

Substance-wise this seems fine. It was a mistake to not make a determinative order.

In terms of text, I don't think "MUST return the oldest records first" is precise enough. "Oldest" needs to be more clearly defined, and "first" is kinda meaningless...I think what you're getting at is the sort order for records as they get paginated is by date added in ascending order.

@jordan2175
Copy link
Author

The following text was added to section 3.4 added_after to try and resolve this issue:

If no added_after URL query parameter is provided, the server MUST return the oldest records matching the request first. For example, if a server has 100 records (0-99) and limits requests to 10 records at a time and a client makes a request without an added_after URL query parameter, the server would start at record 0 looking for a match and work its way up from oldest to newest finding 10 records that matched the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
TAXII-2.1
  
Done
Development

No branches or pull requests

2 participants