[ 
https://issues.apache.org/jira/browse/SOLR-10303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15933087#comment-15933087
 ] 

Gethin James commented on SOLR-10303:
-------------------------------------

We could do with some documentation! Here is a start:

Date functions
Date Stream Evaluators can be used to evaluate the date part of other field 
values in a tuple. Supported data types are String in the ISO_INSTANT date 
format, Instant, java.util.Date, LocalDateTime or an instance of 
TemporalAccessor.

eg.
{code}
year(fieldA)  //where fieldA is a field with a String in the ISO_INSTANT date 
format
month(fieldA)
hour(fieldA)
{code}

* year - The year part of a date
* month - The month of the year
* day - The day of the month
* dayOfYear - The day of the year
* dayOfQuarter - The day of the quarter
* hour - hour of the day, from 0 to 23.
* minute - minute of the hour
* quarter - quarter of the year
* week -  Iso standard week of a year, 1 to 53 weeks.
* second - second of the minute
* epoch - number of milliseconds from the epoch

> Add date/time Stream Evaluators
> -------------------------------
>
>                 Key: SOLR-10303
>                 URL: https://issues.apache.org/jira/browse/SOLR-10303
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Joel Bernstein
>         Attachments: SOLR-10303.patch
>
>
> This ticket will add Stream Evaluators that extract date/time values from a 
> Solr date field. The following Evaluators will be supported:
> hour (date)
> minute (date)
> month (date) 
> monthname(date) 
> quarter(date) 
> second (date)
> year(date)
> Syntax:
> {code}
> select(id,
>        year(recdate) as year,
>        month(recdate) as month,
>        day(recdate) as day,
>        search(logs, q="blah", fl="id, recdate", sort="recdate asc", 
> qt="/export"))
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to