-
Notifications
You must be signed in to change notification settings - Fork 302
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
I would love something that handles dates to the solr/lucene format #58
Comments
I think a date helper can be useful, this way users don't need to know to exact details of the format required by Solr. Since dates can be used for all query types, so I think this should be placed in the Solarium_Query_Helper class. This is already available in all queries using the getHelper method. Solarium should not depend on Zend Framework for the date conversion. Luckily the date conversion is not hard to implement. I've seen an example of this in a commit of Gasol, see: The ISO8601 format is the right one. The DateTime class is part of the PHP core since 5.2 and Solarium requires PHP 5.2+ so this can safely be used. The method in the example would need to be moved to the query helper class. |
I'm closing this issue, as the discussion is now ongoing in issue #62 |
fix issue #58 add formatDate to query helper
This is the DateField that is handled in solr. But this is slightly different than the full RFC 3339. So this is how i convert my dates. see:
RFC 3339 :
2011-12-01T00:00:00+01:00
solr expects:
2000-05-23T22:00:00Z
I have a few questions:
helper
or intergrated in theSolarium_Query_Select
etc.The text was updated successfully, but these errors were encountered: