[ https://issues.apache.org/jira/browse/SOLR-10303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15960524#comment-15960524 ]
ASF GitHub Bot commented on SOLR-10303: --------------------------------------- Github user covolution commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/171#discussion_r110346756 --- Diff: solr/core/src/java/org/apache/solr/handler/StreamHandler.java --- @@ -191,7 +237,20 @@ public void inform(SolrCore core) { .withFunctionName("lteq", LessThanEqualToEvaluator.class) .withFunctionName("not", NotEvaluator.class) .withFunctionName("or", OrEvaluator.class) - + + // Date Time Evaluators + .withFunctionName(TemporalEvaluatorYear.FUNCTION_NAME, TemporalEvaluatorYear.class) --- End diff -- I agree with what you are saying. Its a tricky question. The function definitions in StreamHandler are all static, there are no class instances. This makes sense if a factory is creating them. If we went for an instance method on an implementation class then that wouldn't really work. (It would allow us to have multiple implementations in the same class though)! So instances vs static is a bit of a problem. I like that you can also use aliases at the moment so wouldn't want to lose that. Are function classes being created on-demand, per request? If we keep with the static implementation, perhaps we can use an interface called FunctionNames to put all the string constants? It would be one central definition list for StreamHandler, GraphHandler and SolrTable. Function implementation classes could still reference the FunctionNames in their implementation. > 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 > > 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