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

Index other post date field (post_date_gmt, post_modified, post_modified_gmt) components #1774

Open
nickdaugherty opened this issue May 15, 2020 · 2 comments
Labels
enhancement module:posts Issues related to the Posts Indexable / Feature.

Comments

@nickdaugherty
Copy link

Is your enhancement related to a problem? Please describe.

Currently, ElasticPress indexes the "components" (like year/month/day/etc) of the post_date field, but not the components of the other core date fields post_date_gmt, post_modified, post_modified_gmt. This means that any query attempting to use these fields in the same way as post_date will not behave as expected.

Describe the solution you'd like

Out of the box, EP indexes all core post date fields in the same way (broken down into components).

Designs

This should be pretty easy, mostly just adding the right Indexable::prepare_date_terms() calls and the mapping changes.

Additional context

Related to #1746 (which is for dates in meta fields)

@tlovett1
Copy link
Member

@nickdaugherty can you open a PR back to this repo?

@nickdaugherty
Copy link
Author

Yep that's the plan (just making sure it's stable on our fork first).

@felipeelia felipeelia added enhancement and removed type:enhancement New feature or request. labels Apr 30, 2021
@felipeelia felipeelia added the module:posts Issues related to the Posts Indexable / Feature. label Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement module:posts Issues related to the Posts Indexable / Feature.
Projects
None yet
Development

No branches or pull requests

3 participants