[
https://issues.apache.org/jira/browse/LUCENE-5207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13766454#comment-13766454
]
ASF subversion and git services commented on LUCENE-5207:
---------------------------------------------------------
Commit 1522907 from [~thetaphi] in branch 'dev/branches/lucene5207'
[ https://svn.apache.org/r1522907 ]
LUCENE-5207: Revert the dynamic class name. Its much better to use the "source
file attribute". The class name is now constant (as every class gets own class
loader) and looks like an internal class of the compiler. The stack trace is
then looking like:
Throwable #1: java.lang.IllegalArgumentException: foobar
at
__randomizedtesting.SeedInfo.seed([3968E8DD2901F71C:4292B9595A397818]:0)
at org.apache.lucene.util.MathUtil.log(MathUtil.java:51)
at
org.apache.lucene.expressions.js.JavascriptCompiler$CompiledExpression.evaluate(logn(2,
0))
at
org.apache.lucene.expressions.js.TestJavascriptFunction.assertEvaluatesTo(TestJavascriptFunction.java:27)
at
org.apache.lucene.expressions.js.TestJavascriptFunction.testLognMethod(TestJavascriptFunction.java:178)
at java.lang.Thread.run(Thread.java:724)
> lucene expressions module
> -------------------------
>
> Key: LUCENE-5207
> URL: https://issues.apache.org/jira/browse/LUCENE-5207
> Project: Lucene - Core
> Issue Type: New Feature
> Reporter: Ryan Ernst
> Attachments: LUCENE-5207.patch
>
>
> Expressions are geared at defining an alternative ranking function (e.g.
> incorporating the text relevance score and other field values/ranking
> signals). So they are conceptually much more like ElasticSearch's scripting
> support (http://www.elasticsearch.org/guide/reference/modules/scripting/)
> than solr's function queries.
> Some additional notes:
> * In addition to referring to other fields, they can also refer to other
> expressions, so they can be used as "computed fields".
> * You can rank documents easily by multiple expressions (its a SortField at
> the end), e.g. Sort by year descending, then some function of score price and
> time ascending.
> * The provided javascript expression syntax is much more efficient than using
> a scripting engine, because it does not have dynamic typing (compiles to
> .class files that work on doubles). Performance is similar to writing a
> custom FieldComparator yourself, but much easier to do.
> * We have solr integration to contribute in the future, but this is just the
> standalone lucene part as a start. Since lucene has no schema, it includes an
> implementation of Bindings (SimpleBindings) that maps variable names to
> SortField's or other expressions.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]