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

allow sorting by indexed_on #24741

Merged
merged 1 commit into from
Jul 8, 2019
Merged

allow sorting by indexed_on #24741

merged 1 commit into from
Jul 8, 2019

Conversation

snopoke
Copy link
Contributor

@snopoke snopoke commented Jul 5, 2019

@snopoke snopoke added the product/all-users-all-environments Change impacts all users on all environments label Jul 5, 2019
@@ -161,7 +161,7 @@ class Meta(CustomResourceMeta):
list_allowed_methods = ['get']
detail_allowed_methods = ['get']
resource_name = 'form'
ordering = ['received_on', 'server_modified_on']
ordering = ['received_on', 'server_modified_on', 'indexed_on']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity, where does indexed_on come from? it isn't in the ES mappings, but maybe I'm misunderstanding exactly what this does.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In ES it's called inserted_at:

doc_ret['inserted_at'] = datetime.datetime.utcnow().isoformat()

'inserted_at': {"type": "date", "format": DATE_FORMATS_STRING},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/all-users-all-environments Change impacts all users on all environments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants