ElasticPress icon indicating copy to clipboard operation
ElasticPress copied to clipboard

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

Open nickdaugherty opened this issue 5 years ago • 2 comments

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)

nickdaugherty avatar May 15 '20 14:05 nickdaugherty

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

tlovett1 avatar May 19 '20 15:05 tlovett1

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

nickdaugherty avatar May 19 '20 16:05 nickdaugherty