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

Add searchable_created_at field #59

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

sascha-karnatz
Copy link
Contributor

Add a new searchable_created_at field to store the created_at timestamps in the search index to allow sorting and/or filterting over these data. Also add a sort parameter to sort by searchable_created_at or the rank (which is the default).

@sascha-karnatz sascha-karnatz force-pushed the add-searchable-created-at branch from 1eec7dc to 9a34cf7 Compare November 7, 2024 08:47
Add an additional timestamp to pg_search_documents table to store the created_at of the page. This timestamp is interesting, if the documents are order or filtered by time.
add date sort to perform_search method to use searchable_created_at date instead of the default pg_search rank sorting.
@sascha-karnatz sascha-karnatz force-pushed the add-searchable-created-at branch from 9a34cf7 to d2f4327 Compare November 7, 2024 08:50
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

Nice feature

@tvdeyen tvdeyen merged commit 98942ef into AlchemyCMS:main Nov 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants