pantheon-systems / solr-power

A WordPress plugin to connect to Pantheon's Apache Solr search infrastructure, or your own!
https://wordpress.org/plugins/solr-power/
GNU General Public License v2.0
126 stars 61 forks source link

Add post_date_iso to schema #463

Closed MikeNGarrett closed 4 years ago

MikeNGarrett commented 4 years ago

Using the TrieDateField field type for this date gives developers the ability to run boosts with date calculations. For example: recip(abs(ms(NOW/HOUR,post_date_iso)),3.16e-11,1,1)

The existing date fields cause a failurl when attempting to run functions like ms().

danielbachhuber commented 4 years ago

Thanks @MikeNGarrett !

Will changing the schema (and adding a field sent in the sync function) cause any errors for existing Solr users?

MikeNGarrett commented 4 years ago

@danielbachhuber Yes, indexing will fail. I see a good path to support this on Pantheon. How do you suggest handling it for users who have implemented their own Solr instance?

danielbachhuber commented 4 years ago

@MikeNGarrett To be honest, we're not really actively adding new features to Solr Power at the moment. The best way to add this might be to simply document how it's possible in the README. It looks like you could filter this attribute into the Solr document with the solr_build_document filter. Want to submit a pull request for that instead?

MikeNGarrett commented 4 years ago

Got it. Will do.