[
https://issues.apache.org/jira/browse/SOLR-10303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15957533#comment-15957533
]
ASF GitHub Bot commented on SOLR-10303:
---------------------------------------
Github user dennisgove commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/171#discussion_r107802207
--- Diff: solr/core/src/java/org/apache/solr/handler/StreamHandler.java ---
@@ -199,10 +200,16 @@ public void inform(SolrCore core) {
.withFunctionName("mult", MultiplyEvaluator.class)
.withFunctionName("sub", SubtractEvaluator.class)
.withFunctionName("log", NaturalLogEvaluator.class)
+
// Conditional Stream Evaluators
.withFunctionName("if", IfThenElseEvaluator.class)
;
+ // Date evaluators
--- End diff --
I'm not a huge fan of using the same class to handle multiple functions.
There are places where we use the class to find the function name and if > 1
functions are mapped to a class then these lookups no longer work.
See
[this](https://github.com/dennisgove/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamFactory.java#L397)
for where it wouldn't work.
> 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: [email protected]
For additional commands, e-mail: [email protected]