Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.6, Trunk
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      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.
      1. LUCENE-5207.patch
        270 kB
        Ryan Ernst
      2. LUCENE-5207.patch
        163 kB
        Robert Muir
      3. LUCENE-5207.patch
        165 kB
        Robert Muir

        Activity

        Ryan Ernst created issue -
        Hide
        Ryan Ernst added a comment -

        First patch. It still needs more documentation and tests, but the core APIs are there.

        Note there is generated code in the patch, so it is a little bloated.

        Show
        Ryan Ernst added a comment - First patch. It still needs more documentation and tests, but the core APIs are there. Note there is generated code in the patch, so it is a little bloated.
        Ryan Ernst made changes -
        Field Original Value New Value
        Attachment LUCENE-5207.patch [ 12602907 ]
        Hide
        Ryan Ernst added a comment -

        Here are some examples of how the API works:

        // compile an expression:
        Expression expr = JavascriptCompiler.compile("sqrt(_score) + ln(popularity)");
          
        // SimpleBindings just maps variables to SortField instances
        SimpleBindings bindings = new SimpleBindings();    
        bindings.add(new SortField("_score", SortField.Type.SCORE));
        bindings.add(new SortField("popularity", SortField.Type.INT));
         
        // create a sort field and sort by it (reverse order)
        Sort sort = new Sort(expr.getSortField(bindings, true));
        Query query = new TermQuery(new Term("body", "contents"));
        searcher.search(query, null, 10, sort);
        
        Show
        Ryan Ernst added a comment - Here are some examples of how the API works: // compile an expression: Expression expr = JavascriptCompiler.compile( "sqrt(_score) + ln(popularity)" ); // SimpleBindings just maps variables to SortField instances SimpleBindings bindings = new SimpleBindings(); bindings.add( new SortField( "_score" , SortField.Type.SCORE)); bindings.add( new SortField( "popularity" , SortField.Type.INT)); // create a sort field and sort by it (reverse order) Sort sort = new Sort(expr.getSortField(bindings, true )); Query query = new TermQuery( new Term( "body" , "contents" )); searcher.search(query, null , 10, sort);
        Hide
        Michael McCandless added a comment -

        Wow, this sounds awesome!

        So, you can use an arbitrary JavaScript expression to combine DV fields and score into a new dynamic field for sorting?

        E.g., a blended relevance + recency sort (which I do w/ a custom comparator now on http://jirasearch.mikemccandless.com).

        Show
        Michael McCandless added a comment - Wow, this sounds awesome! So, you can use an arbitrary JavaScript expression to combine DV fields and score into a new dynamic field for sorting? E.g., a blended relevance + recency sort (which I do w/ a custom comparator now on http://jirasearch.mikemccandless.com ).
        Hide
        Uwe Schindler added a comment - - edited

        Hi, very cool!

        I like the elegant parser!

        Its also the correct way to do the dynamic classes: 1 class per classloader, so it can be unloaded easily. The JVM does the same for reflection speedups (it creates stubs for Method#invoke calls, one stub per classloader). The "Loader" class is already "policeman-certified" and used by my code, too.

        I am not happy about the various raw "signatures" in binary form. I would rewrite JavascriptFunction to take a java.lang.reflect.Method objects and use http://asm.ow2.org/asm40/javadoc/user/org/objectweb/asm/commons/Method.html#getMethod(java.lang.reflect.Method) or http://asm.ow2.org/asm40/javadoc/user/org/objectweb/asm/Type.html#getMethodDescriptor(java.lang.reflect.Method) to get the signature and argument count. The other hardcoded "L/foo/bar" stuff should be rewritten to use http://asm.ow2.org/asm40/javadoc/user/org/objectweb/asm/Type.html#getDescriptor(java.lang.Class). I can help with that. By using real reflected types we have the safety that all methods are syntactically correct and checked at runtime/compile time.

        I think we should create a heavy committing branch. I would help, this is too cool.

        Show
        Uwe Schindler added a comment - - edited Hi, very cool! I like the elegant parser! Its also the correct way to do the dynamic classes: 1 class per classloader, so it can be unloaded easily. The JVM does the same for reflection speedups (it creates stubs for Method#invoke calls, one stub per classloader). The "Loader" class is already "policeman-certified" and used by my code, too. I am not happy about the various raw "signatures" in binary form. I would rewrite JavascriptFunction to take a java.lang.reflect.Method objects and use http://asm.ow2.org/asm40/javadoc/user/org/objectweb/asm/commons/Method.html#getMethod(java.lang.reflect.Method) or http://asm.ow2.org/asm40/javadoc/user/org/objectweb/asm/Type.html#getMethodDescriptor(java.lang.reflect.Method) to get the signature and argument count. The other hardcoded "L/foo/bar" stuff should be rewritten to use http://asm.ow2.org/asm40/javadoc/user/org/objectweb/asm/Type.html#getDescriptor(java.lang.Class) . I can help with that. By using real reflected types we have the safety that all methods are syntactically correct and checked at runtime/compile time. I think we should create a heavy committing branch. I would help, this is too cool.
        Hide
        ASF subversion and git services added a comment -

        Commit 1522767 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522767 ]

        LUCENE-5207: initial patch from ryan

        Show
        ASF subversion and git services added a comment - Commit 1522767 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522767 ] LUCENE-5207 : initial patch from ryan
        Hide
        Robert Muir added a comment -

        I am not happy about the various raw "signatures" in binary form.

        +1, I am not either, lets fix that. Otherwise we rely completely on tests to ensure e.g. every function is working and so on.

        I think we should create a heavy committing branch.

        I created a branch here: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5207

        Show
        Robert Muir added a comment - I am not happy about the various raw "signatures" in binary form. +1, I am not either, lets fix that. Otherwise we rely completely on tests to ensure e.g. every function is working and so on. I think we should create a heavy committing branch. I created a branch here: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5207
        Hide
        ASF subversion and git services added a comment -

        Commit 1522768 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522768 ]

        LUCENE-5207: setup svn:ignores and so on

        Show
        ASF subversion and git services added a comment - Commit 1522768 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522768 ] LUCENE-5207 : setup svn:ignores and so on
        Hide
        ASF subversion and git services added a comment -

        Commit 1522769 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522769 ]

        LUCENE-5207: eol-style native

        Show
        ASF subversion and git services added a comment - Commit 1522769 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522769 ] LUCENE-5207 : eol-style native
        Hide
        ASF subversion and git services added a comment -

        Commit 1522770 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522770 ]

        LUCENE-5207: replaceregexp tabs with spaces in generated parser

        Show
        ASF subversion and git services added a comment - Commit 1522770 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522770 ] LUCENE-5207 : replaceregexp tabs with spaces in generated parser
        Hide
        ASF subversion and git services added a comment -

        Commit 1522771 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522771 ]

        LUCENE-5207: only depends on antlr-runtime

        Show
        ASF subversion and git services added a comment - Commit 1522771 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522771 ] LUCENE-5207 : only depends on antlr-runtime
        Hide
        ASF subversion and git services added a comment -

        Commit 1522772 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522772 ]

        LUCENE-5207: fix broken javadoc link

        Show
        ASF subversion and git services added a comment - Commit 1522772 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522772 ] LUCENE-5207 : fix broken javadoc link
        Hide
        ASF subversion and git services added a comment -

        Commit 1522781 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522781 ]

        LUCENE-5207: minor docs and API cleanups

        Show
        ASF subversion and git services added a comment - Commit 1522781 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522781 ] LUCENE-5207 : minor docs and API cleanups
        Hide
        ASF subversion and git services added a comment -

        Commit 1522783 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522783 ]

        LUCENE-5207: sync up syntax docs

        Show
        ASF subversion and git services added a comment - Commit 1522783 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522783 ] LUCENE-5207 : sync up syntax docs
        Hide
        ASF subversion and git services added a comment -

        Commit 1522788 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522788 ]

        LUCENE-5207: maven/idea config

        Show
        ASF subversion and git services added a comment - Commit 1522788 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522788 ] LUCENE-5207 : maven/idea config
        Hide
        Uwe Schindler added a comment -

        Thanks Robert, I will refactor the JavaScriptFunctions class as a first step!

        Show
        Uwe Schindler added a comment - Thanks Robert, I will refactor the JavaScriptFunctions class as a first step!
        Hide
        ASF subversion and git services added a comment -

        Commit 1522798 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522798 ]

        LUCENE-5207: simplify tests

        Show
        ASF subversion and git services added a comment - Commit 1522798 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522798 ] LUCENE-5207 : simplify tests
        Hide
        ASF subversion and git services added a comment -

        Commit 1522805 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522805 ]

        LUCENE-5207: Cleanup JavascriptFunction class to use reflection and type-safe checking (to be extended)

        Show
        ASF subversion and git services added a comment - Commit 1522805 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522805 ] LUCENE-5207 : Cleanup JavascriptFunction class to use reflection and type-safe checking (to be extended)
        Hide
        ASF subversion and git services added a comment -

        Commit 1522813 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522813 ]

        LUCENE-5207: More strict checks for invalid method signatures (currently only double is accepted as parameter or return type). The method must be static, too.

        Show
        ASF subversion and git services added a comment - Commit 1522813 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522813 ] LUCENE-5207 : More strict checks for invalid method signatures (currently only double is accepted as parameter or return type). The method must be static, too.
        Hide
        ASF subversion and git services added a comment -

        Commit 1522822 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522822 ]

        LUCENE-5207: Add missing test for atan2 including funny values (+/-0). The original patch had a bug with this method, because the arity was wrong.

        Show
        ASF subversion and git services added a comment - Commit 1522822 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522822 ] LUCENE-5207 : Add missing test for atan2 including funny values (+/-0). The original patch had a bug with this method, because the arity was wrong.
        Hide
        Uwe Schindler added a comment -

        Currently the JavascriptFunction class is very inflexible and hard to extend with custom new methods (maybe needed for Solr).

        I propose to make the javascript name ("call") and the mapped Java method signature ("method") be a resource file. We can use the forbidden-apis signature parser to lookup the methods.

        Show
        Uwe Schindler added a comment - Currently the JavascriptFunction class is very inflexible and hard to extend with custom new methods (maybe needed for Solr). I propose to make the javascript name ("call") and the mapped Java method signature ("method") be a resource file. We can use the forbidden-apis signature parser to lookup the methods.
        Hide
        ASF subversion and git services added a comment -

        Commit 1522839 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522839 ]

        LUCENE-5207: Simplifications

        Show
        ASF subversion and git services added a comment - Commit 1522839 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522839 ] LUCENE-5207 : Simplifications
        Hide
        ASF subversion and git services added a comment -

        Commit 1522850 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522850 ]

        LUCENE-5207: Remove the crazy internal signature notation and use ASM Type to generate them

        Show
        ASF subversion and git services added a comment - Commit 1522850 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522850 ] LUCENE-5207 : Remove the crazy internal signature notation and use ASM Type to generate them
        Hide
        ASF subversion and git services added a comment -

        Commit 1522858 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522858 ]

        LUCENE-5207: Remove classloader constructor, because it makes no sense to use any other classloader

        Show
        ASF subversion and git services added a comment - Commit 1522858 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522858 ] LUCENE-5207 : Remove classloader constructor, because it makes no sense to use any other classloader
        Hide
        ASF subversion and git services added a comment -

        Commit 1522873 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522873 ]

        LUCENE-5207: Create the class name of generated classes from the parsed text

        Show
        ASF subversion and git services added a comment - Commit 1522873 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522873 ] LUCENE-5207 : Create the class name of generated classes from the parsed text
        Hide
        ASF subversion and git services added a comment -

        Commit 1522877 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522877 ]

        LUCENE-5207: Limit the maximum class name length

        Show
        ASF subversion and git services added a comment - Commit 1522877 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522877 ] LUCENE-5207 : Limit the maximum class name length
        Hide
        ASF subversion and git services added a comment -

        Commit 1522888 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522888 ]

        LUCENE-5207: Remove stupidity...

        Show
        ASF subversion and git services added a comment - Commit 1522888 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522888 ] LUCENE-5207 : Remove stupidity...
        Hide
        ASF subversion and git services added a comment -

        Commit 1522907 from Uwe Schindler 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)

        Show
        ASF subversion and git services added a comment - Commit 1522907 from Uwe Schindler 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)
        Hide
        ASF subversion and git services added a comment -

        Commit 1522925 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522925 ]

        LUCENE-5207: Add a unused test method to make sure that if we change the FunctionValues interface we get compile error. Also make the class format version a constant for easy maintenance (once we backport)

        Show
        ASF subversion and git services added a comment - Commit 1522925 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522925 ] LUCENE-5207 : Add a unused test method to make sure that if we change the FunctionValues interface we get compile error. Also make the class format version a constant for easy maintenance (once we backport)
        Hide
        ASF subversion and git services added a comment -

        Commit 1522967 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522967 ]

        LUCENE-5207: Remove classloader field (is not needed, we call only once)

        Show
        ASF subversion and git services added a comment - Commit 1522967 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522967 ] LUCENE-5207 : Remove classloader field (is not needed, we call only once)
        Hide
        ASF subversion and git services added a comment -

        Commit 1522972 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1522972 ]

        LUCENE-5207: Refactor compiler to use final fields and simplify initialization

        Show
        ASF subversion and git services added a comment - Commit 1522972 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1522972 ] LUCENE-5207 : Refactor compiler to use final fields and simplify initialization
        Hide
        ASF subversion and git services added a comment -

        Commit 1523016 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523016 ]

        LUCENE-5207: Minor cleanups, also mark all generated methods as SYNTHETIC because there exists no source code

        Show
        ASF subversion and git services added a comment - Commit 1523016 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523016 ] LUCENE-5207 : Minor cleanups, also mark all generated methods as SYNTHETIC because there exists no source code
        Hide
        ASF subversion and git services added a comment -

        Commit 1523042 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523042 ]

        LUCENE-5207: Update to antlr 3.5 (which produces no warnings while compiling with java 7). Also fix the regen-macro to handle windows file paths while replacing

        Show
        ASF subversion and git services added a comment - Commit 1523042 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523042 ] LUCENE-5207 : Update to antlr 3.5 (which produces no warnings while compiling with java 7). Also fix the regen-macro to handle windows file paths while replacing
        Hide
        ASF subversion and git services added a comment -

        Commit 1523046 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523046 ]

        LUCENE-5207: replace tabs by 2 spaces now. antlr 3.5 produces tabs consistently now, so we can replace them (no mixed tabs anymore)

        Show
        ASF subversion and git services added a comment - Commit 1523046 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523046 ] LUCENE-5207 : replace tabs by 2 spaces now. antlr 3.5 produces tabs consistently now, so we can replace them (no mixed tabs anymore)
        Hide
        ASF subversion and git services added a comment -

        Commit 1523047 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523047 ]

        LUCENE-5207: upgrade checksum/maven

        Show
        ASF subversion and git services added a comment - Commit 1523047 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523047 ] LUCENE-5207 : upgrade checksum/maven
        Hide
        ASF subversion and git services added a comment -

        Commit 1523057 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523057 ]

        LUCENE-5207: try a hack around antlr hashmap bugs

        Show
        ASF subversion and git services added a comment - Commit 1523057 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523057 ] LUCENE-5207 : try a hack around antlr hashmap bugs
        Hide
        ASF subversion and git services added a comment -

        Commit 1523059 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523059 ]

        LUCENE-5207: enforce encoding and locale (for paranoia reasons)

        Show
        ASF subversion and git services added a comment - Commit 1523059 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523059 ] LUCENE-5207 : enforce encoding and locale (for paranoia reasons)
        Hide
        ASF subversion and git services added a comment -

        Commit 1523075 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523075 ]

        LUCENE-5207: add comment that the regen hack does not work in Java 8

        Show
        ASF subversion and git services added a comment - Commit 1523075 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523075 ] LUCENE-5207 : add comment that the regen hack does not work in Java 8
        Hide
        ASF subversion and git services added a comment -

        Commit 1523114 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523114 ]

        LUCENE-5207: load available javascript functions from resource file (properties)

        Show
        ASF subversion and git services added a comment - Commit 1523114 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523114 ] LUCENE-5207 : load available javascript functions from resource file (properties)
        Hide
        ASF subversion and git services added a comment -

        Commit 1523204 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523204 ]

        LUCENE-5207: Throw correct exception in JavascriptFunction ctor

        Show
        ASF subversion and git services added a comment - Commit 1523204 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523204 ] LUCENE-5207 : Throw correct exception in JavascriptFunction ctor
        Hide
        Uwe Schindler added a comment -

        I think the branch is now in a quite good state.

        I thought a little bit about extensibility of Javascript functions: The current code is more or less "hardcoded" (although its configureable by a resource file in the JAR). But this is not extensible by users (all private, you have to rebuild JAR).

        My idea would be to extend Bindings to also allow to get "methods". So one could register a java.lang.reflect.Method binding. The code would check that it only accepts "double" as parameters and returns a "double". Solr could then use this to register stuff like "haversine". The compiler would be extended to first try to get a binding for the function name (if it is a Method instance) otherwise it falls back to the builtins.

        Another thing to discuss (which is not yet a problem): If we allow function binding and e.g. a Solr contrib from SolrResourceLoader would register a function, the generated bytecode would fail to find the function: This is because we use the classloader of the JavaScript module not the one of the caller. We should either make this configureable or (I like this better): If somebody registers a custom function we should include this into the classloader, so the custom function impl class can be found by the JVM:

        • the classloader of the custom function must be at least a child classloader of the function module, otherwise it won't work at all. If all registered custom functions don't have a common classloader hierarchy, throw exception.
        • the child classloader check function is already part of Lucene, it is used when loading SPIs.

        If we make the classloader configureable (like it was in the original patch), we must also check that our own classloader is a parent of the given one.

        Show
        Uwe Schindler added a comment - I think the branch is now in a quite good state. I thought a little bit about extensibility of Javascript functions: The current code is more or less "hardcoded" (although its configureable by a resource file in the JAR). But this is not extensible by users (all private, you have to rebuild JAR). My idea would be to extend Bindings to also allow to get "methods". So one could register a java.lang.reflect.Method binding. The code would check that it only accepts "double" as parameters and returns a "double". Solr could then use this to register stuff like "haversine". The compiler would be extended to first try to get a binding for the function name (if it is a Method instance) otherwise it falls back to the builtins. Another thing to discuss (which is not yet a problem): If we allow function binding and e.g. a Solr contrib from SolrResourceLoader would register a function, the generated bytecode would fail to find the function: This is because we use the classloader of the JavaScript module not the one of the caller. We should either make this configureable or (I like this better): If somebody registers a custom function we should include this into the classloader, so the custom function impl class can be found by the JVM: the classloader of the custom function must be at least a child classloader of the function module, otherwise it won't work at all. If all registered custom functions don't have a common classloader hierarchy, throw exception. the child classloader check function is already part of Lucene, it is used when loading SPIs. If we make the classloader configureable (like it was in the original patch), we must also check that our own classloader is a parent of the given one.
        Hide
        Robert Muir added a comment -

        Uwe: can we defer that function stuff to another issue?

        The whole discussion about classloader stuff doesnt make a lot of sense to me. Today Functions are implemented with just normal invokeVirtual. Bindings aren't used until you actually run the query... Today the way an expression interacts with the Bindings is not with invokeVirtual, its just another valuesource coming in to its array at runtime.

        So I dont think custom functions should go thru Bindings, its totally unrelated to how that class works at all. I also don't want to make the API very confusing just because solr does crazy things with classloaders quite yet: I think this is very close to usable for lucene users as-is.

        Show
        Robert Muir added a comment - Uwe: can we defer that function stuff to another issue? The whole discussion about classloader stuff doesnt make a lot of sense to me. Today Functions are implemented with just normal invokeVirtual. Bindings aren't used until you actually run the query... Today the way an expression interacts with the Bindings is not with invokeVirtual, its just another valuesource coming in to its array at runtime. So I dont think custom functions should go thru Bindings, its totally unrelated to how that class works at all. I also don't want to make the API very confusing just because solr does crazy things with classloaders quite yet: I think this is very close to usable for lucene users as-is.
        Hide
        ASF subversion and git services added a comment -

        Commit 1523279 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523279 ]

        LUCENE-5207: add resources folder here

        Show
        ASF subversion and git services added a comment - Commit 1523279 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523279 ] LUCENE-5207 : add resources folder here
        Hide
        Robert Muir added a comment -

        I thought a little bit about extensibility of Javascript functions: The current code is more or less "hardcoded" (although its configureable by a resource file in the JAR). But this is not extensible by users (all private, you have to rebuild JAR).

        Thats not exactly true. Someone can make plug in their own compiler that compiles String->Expression in some other way.

        If we want to make this particular one more extensible, then we should give it ctors or protected methods to do that.

        This is easy to do and does not involve classloader hell. Doing functions through Bindings would be both slow and wrong.

        Show
        Robert Muir added a comment - I thought a little bit about extensibility of Javascript functions: The current code is more or less "hardcoded" (although its configureable by a resource file in the JAR). But this is not extensible by users (all private, you have to rebuild JAR). Thats not exactly true. Someone can make plug in their own compiler that compiles String->Expression in some other way. If we want to make this particular one more extensible, then we should give it ctors or protected methods to do that. This is easy to do and does not involve classloader hell. Doing functions through Bindings would be both slow and wrong.
        Hide
        Uwe Schindler added a comment -

        Hi Robert,
        sorry for beeing a little bit confusing:
        The two issues Classloader and Functions extensibility don't really have something to do, they are mostly separate. With the current code and private ctors and static functions, there is indeed no need for a custom classloader. This is why I argued to remove it.

        The classloader also does not have anything to do with Bindings. The bindings was just an idea how to make it "easy" for the user to register own functions in a non-static way. I was under the impression, that the bindings are availabe while compiling. I don't want it "dynamic" - I wanted it still statically compiled. The idea was to add the reflected Method to the bindings, so when compiling the bytecode the method can be used (not per call). After reviewing the code again, I can see that the bindings are not available at the time of compiling - that was the misunderstanding, sorry (but it could still be fixed to support this). It just looked elegant to treat a function like a binding.

        The current patch is fine, let's commit it and do all other stuff like extending custom functions later. For that we have to make the whole JavascriptFunction interface public and non-static (currently its a singleton-like factory). But this can be done in another issue.

        The classloader problem is something that comes into the game when users are able to register own functions. The problem here is that the classloader used to load the ASM-generated class has the one of lucene-core as parent (because we use the compiler's own classloader: this.getClass().getClassloader()). This classloader does not necessarily have access to anything in a different classloader (e.g. a plugin in ElasticSearch or Solr).

        Finally its simple: Once we allow foreign, user-defined functions, we must add the Classloader argument to the compiler again, otherwise you cannot register methods from classes of foreign classloaders. An alternative would be to let the compiler figure out himself by passing a list of java.lang.reflect.Method and it chooses the correct classloader automatically.

        Show
        Uwe Schindler added a comment - Hi Robert, sorry for beeing a little bit confusing: The two issues Classloader and Functions extensibility don't really have something to do, they are mostly separate. With the current code and private ctors and static functions, there is indeed no need for a custom classloader. This is why I argued to remove it. The classloader also does not have anything to do with Bindings. The bindings was just an idea how to make it "easy" for the user to register own functions in a non-static way. I was under the impression, that the bindings are availabe while compiling. I don't want it "dynamic" - I wanted it still statically compiled. The idea was to add the reflected Method to the bindings, so when compiling the bytecode the method can be used (not per call). After reviewing the code again, I can see that the bindings are not available at the time of compiling - that was the misunderstanding, sorry (but it could still be fixed to support this). It just looked elegant to treat a function like a binding. The current patch is fine, let's commit it and do all other stuff like extending custom functions later. For that we have to make the whole JavascriptFunction interface public and non-static (currently its a singleton-like factory). But this can be done in another issue. The classloader problem is something that comes into the game when users are able to register own functions. The problem here is that the classloader used to load the ASM-generated class has the one of lucene-core as parent (because we use the compiler's own classloader: this.getClass().getClassloader()). This classloader does not necessarily have access to anything in a different classloader (e.g. a plugin in ElasticSearch or Solr). Finally its simple: Once we allow foreign, user-defined functions, we must add the Classloader argument to the compiler again, otherwise you cannot register methods from classes of foreign classloaders. An alternative would be to let the compiler figure out himself by passing a list of java.lang.reflect.Method and it chooses the correct classloader automatically.
        Hide
        ASF subversion and git services added a comment -

        Commit 1523286 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523286 ]

        LUCENE-5207: make functions pluggable

        Show
        ASF subversion and git services added a comment - Commit 1523286 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523286 ] LUCENE-5207 : make functions pluggable
        Hide
        Robert Muir added a comment -

        Hi Uwe: please see my commit (we can revert it, if we have to, but i think its an easy step).

        The idea is: JavascriptFunction as a class provides nothing really, it is nothing more than a Method with some extra checks in its ctor.

        So i dont think this class need exist at all, and the default list is nothing but a unmodifiable Map<String,Method>.

        So in addition to:

        public static Expression compile(String sourceText);
        

        I added:

          public static Expression compile(String sourceText, Map<String,Method> functions) throws ParseException {
            for (Method m : functions.values()) {
              checkFunction(m);
            }
            return new JavascriptCompiler(sourceText, functions).compileExpression();
          }
        

        I will add some tests, but this is very simple and allows someone to expose whatever methods they want, not just add but also remove

        Show
        Robert Muir added a comment - Hi Uwe: please see my commit (we can revert it, if we have to, but i think its an easy step). The idea is: JavascriptFunction as a class provides nothing really, it is nothing more than a Method with some extra checks in its ctor. So i dont think this class need exist at all, and the default list is nothing but a unmodifiable Map<String,Method>. So in addition to: public static Expression compile( String sourceText); I added: public static Expression compile( String sourceText, Map< String ,Method> functions) throws ParseException { for (Method m : functions.values()) { checkFunction(m); } return new JavascriptCompiler(sourceText, functions).compileExpression(); } I will add some tests, but this is very simple and allows someone to expose whatever methods they want, not just add but also remove
        Hide
        Robert Muir added a comment -

        Finally its simple: Once we allow foreign, user-defined functions, we must add the Classloader argument to the compiler again, otherwise you cannot register methods from classes of foreign classloaders. An alternative would be to let the compiler figure out himself by passing a list of java.lang.reflect.Method and it chooses the correct classloader automatically.

        I think we can add this to the second method signature?

        Show
        Robert Muir added a comment - Finally its simple: Once we allow foreign, user-defined functions, we must add the Classloader argument to the compiler again, otherwise you cannot register methods from classes of foreign classloaders. An alternative would be to let the compiler figure out himself by passing a list of java.lang.reflect.Method and it chooses the correct classloader automatically. I think we can add this to the second method signature?
        Hide
        ASF subversion and git services added a comment -

        Commit 1523296 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523296 ]

        LUCENE-5207: add some simple tests for custom functions

        Show
        ASF subversion and git services added a comment - Commit 1523296 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523296 ] LUCENE-5207 : add some simple tests for custom functions
        Hide
        ASF subversion and git services added a comment -

        Commit 1523297 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523297 ]

        LUCENE-5207: allow specifying classloader when using custom functions

        Show
        ASF subversion and git services added a comment - Commit 1523297 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523297 ] LUCENE-5207 : allow specifying classloader when using custom functions
        Hide
        ASF subversion and git services added a comment -

        Commit 1523300 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523300 ]

        LUCENE-5207: add some checks and tests for illegal stuff

        Show
        ASF subversion and git services added a comment - Commit 1523300 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523300 ] LUCENE-5207 : add some checks and tests for illegal stuff
        Hide
        ASF subversion and git services added a comment -

        Commit 1523301 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523301 ]

        LUCENE-5207: check the class too

        Show
        ASF subversion and git services added a comment - Commit 1523301 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523301 ] LUCENE-5207 : check the class too
        Hide
        ASF subversion and git services added a comment -

        Commit 1523302 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523302 ]

        LUCENE-5207: fix oops in test

        Show
        ASF subversion and git services added a comment - Commit 1523302 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523302 ] LUCENE-5207 : fix oops in test
        Hide
        ASF subversion and git services added a comment -

        Commit 1523315 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523315 ]

        LUCENE-5207: Add checks for classloader, so all methods in the Map are accessible

        Show
        ASF subversion and git services added a comment - Commit 1523315 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523315 ] LUCENE-5207 : Add checks for classloader, so all methods in the Map are accessible
        Hide
        ASF subversion and git services added a comment -

        Commit 1523324 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523324 ]

        LUCENE-5207: Remove useless check

        Show
        ASF subversion and git services added a comment - Commit 1523324 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523324 ] LUCENE-5207 : Remove useless check
        Hide
        ASF subversion and git services added a comment -

        Commit 1523339 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523339 ]

        LUCENE-5207: add test for huge amounts of variables

        Show
        ASF subversion and git services added a comment - Commit 1523339 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523339 ] LUCENE-5207 : add test for huge amounts of variables
        Hide
        ASF subversion and git services added a comment -

        Commit 1523341 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523341 ]

        LUCENE-5207: Start to rewrite the bytecode generator using GeneratorAdapter

        Show
        ASF subversion and git services added a comment - Commit 1523341 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523341 ] LUCENE-5207 : Start to rewrite the bytecode generator using GeneratorAdapter
        Hide
        ASF subversion and git services added a comment -

        Commit 1523345 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523345 ]

        LUCENE-5207: update maven config

        Show
        ASF subversion and git services added a comment - Commit 1523345 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523345 ] LUCENE-5207 : update maven config
        Hide
        ASF subversion and git services added a comment -

        Commit 1523350 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523350 ]

        LUCENE-5207: add test

        Show
        ASF subversion and git services added a comment - Commit 1523350 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523350 ] LUCENE-5207 : add test
        Hide
        ASF subversion and git services added a comment -

        Commit 1523351 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523351 ]

        LUCENE-5207: more parser tests

        Show
        ASF subversion and git services added a comment - Commit 1523351 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523351 ] LUCENE-5207 : more parser tests
        Hide
        ASF subversion and git services added a comment -

        Commit 1523357 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523357 ]

        LUCENE-5207: more tests

        Show
        ASF subversion and git services added a comment - Commit 1523357 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523357 ] LUCENE-5207 : more tests
        Hide
        ASF subversion and git services added a comment -

        Commit 1523358 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523358 ]

        LUCENE-5207: More simplifications

        Show
        ASF subversion and git services added a comment - Commit 1523358 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523358 ] LUCENE-5207 : More simplifications
        Hide
        ASF subversion and git services added a comment -

        Commit 1523360 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523360 ]

        LUCENE-5207: Thanks Robert for help with this opcode

        Show
        ASF subversion and git services added a comment - Commit 1523360 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523360 ] LUCENE-5207 : Thanks Robert for help with this opcode
        Hide
        ASF subversion and git services added a comment -

        Commit 1523361 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523361 ]

        LUCENE-5207: Simpler without cast

        Show
        ASF subversion and git services added a comment - Commit 1523361 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523361 ] LUCENE-5207 : Simpler without cast
        Hide
        ASF subversion and git services added a comment -

        Commit 1523362 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523362 ]

        LUCENE-5207: Rename method, use a switch statement again

        Show
        ASF subversion and git services added a comment - Commit 1523362 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523362 ] LUCENE-5207 : Rename method, use a switch statement again
        Hide
        ASF subversion and git services added a comment -

        Commit 1523364 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523364 ]

        LUCENE-5207: Rename field

        Show
        ASF subversion and git services added a comment - Commit 1523364 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523364 ] LUCENE-5207 : Rename field
        Hide
        ASF subversion and git services added a comment -

        Commit 1523375 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523375 ]

        LUCENE-5207: Simplify the comparisons

        Show
        ASF subversion and git services added a comment - Commit 1523375 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523375 ] LUCENE-5207 : Simplify the comparisons
        Hide
        ASF subversion and git services added a comment -

        Commit 1523382 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523382 ]

        LUCENE-5207: simplify some of operators

        Show
        ASF subversion and git services added a comment - Commit 1523382 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523382 ] LUCENE-5207 : simplify some of operators
        Hide
        ASF subversion and git services added a comment -

        Commit 1523385 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523385 ]

        LUCENE-5207: javadocs

        Show
        ASF subversion and git services added a comment - Commit 1523385 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523385 ] LUCENE-5207 : javadocs
        Hide
        ASF subversion and git services added a comment -

        Commit 1523393 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523393 ]

        LUCENE-5207: add test

        Show
        ASF subversion and git services added a comment - Commit 1523393 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523393 ] LUCENE-5207 : add test
        Hide
        ASF subversion and git services added a comment -

        Commit 1523394 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523394 ]

        LUCENE-5207: simplify

        Show
        ASF subversion and git services added a comment - Commit 1523394 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523394 ] LUCENE-5207 : simplify
        Hide
        ASF subversion and git services added a comment -

        Commit 1523395 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523395 ]

        LUCENE-5207: didnt mean to change unrelated test...

        Show
        ASF subversion and git services added a comment - Commit 1523395 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523395 ] LUCENE-5207 : didnt mean to change unrelated test...
        Hide
        Robert Muir added a comment -

        Here's an applyable patch for review showing differences between branch and trunk.

        I excluded generated code, so run 'ant regenerate' first.

        Show
        Robert Muir added a comment - Here's an applyable patch for review showing differences between branch and trunk. I excluded generated code, so run 'ant regenerate' first.
        Robert Muir made changes -
        Attachment LUCENE-5207.patch [ 12603218 ]
        Hide
        ASF subversion and git services added a comment -

        Commit 1523419 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523419 ]

        LUCENE-5207: Add a test which verifies that the classloader restrictions work correctly

        Show
        ASF subversion and git services added a comment - Commit 1523419 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523419 ] LUCENE-5207 : Add a test which verifies that the classloader restrictions work correctly
        Hide
        ASF subversion and git services added a comment -

        Commit 1523421 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523421 ]

        LUCENE-5207: Actually test that it works with mixed classloaders

        Show
        ASF subversion and git services added a comment - Commit 1523421 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523421 ] LUCENE-5207 : Actually test that it works with mixed classloaders
        Hide
        ASF subversion and git services added a comment -

        Commit 1523426 from Uwe Schindler in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523426 ]

        LUCENE-5207: Better classloade test: It now uses a completely synthetic class, so its 100% unreachable from main classloader. Also remove the static Opcodes imports

        Show
        ASF subversion and git services added a comment - Commit 1523426 from Uwe Schindler in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523426 ] LUCENE-5207 : Better classloade test: It now uses a completely synthetic class, so its 100% unreachable from main classloader. Also remove the static Opcodes imports
        Hide
        Uwe Schindler added a comment -

        +1 to merge & commit this to trunk and 4.x. In the last 3 commits to the branch I just added new tests, so no functional changes anymore.

        Robert: If you create a new patch for reference, it would be good. Otherwise do merge --reintegrate, commit, and delete the branch!

        Show
        Uwe Schindler added a comment - +1 to merge & commit this to trunk and 4.x. In the last 3 commits to the branch I just added new tests, so no functional changes anymore. Robert: If you create a new patch for reference, it would be good. Otherwise do merge --reintegrate, commit, and delete the branch!
        Hide
        Robert Muir added a comment -

        Yes, I'll merge (because I am not totally sure about the python script really showing all the differences in various config stuff).

        Here is the updated patch from the script though.

        Show
        Robert Muir added a comment - Yes, I'll merge (because I am not totally sure about the python script really showing all the differences in various config stuff). Here is the updated patch from the script though.
        Robert Muir made changes -
        Attachment LUCENE-5207.patch [ 12603240 ]
        Hide
        Uwe Schindler added a comment -

        Thanks!

        Show
        Uwe Schindler added a comment - Thanks!
        Hide
        ASF subversion and git services added a comment -

        Commit 1523462 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1523462 ]

        LUCENE-5207: lucene expressions module

        Show
        ASF subversion and git services added a comment - Commit 1523462 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1523462 ] LUCENE-5207 : lucene expressions module
        Hide
        ASF subversion and git services added a comment -

        Commit 1523464 from Uwe Schindler in branch 'dev/trunk'
        [ https://svn.apache.org/r1523464 ]

        LUCENE-5207: Fix a bug in the test and add final to the classloader

        Show
        ASF subversion and git services added a comment - Commit 1523464 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1523464 ] LUCENE-5207 : Fix a bug in the test and add final to the classloader
        Hide
        ASF subversion and git services added a comment -

        Commit 1523470 from Robert Muir in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1523470 ]

        LUCENE-5207: lucene expressions module

        Show
        ASF subversion and git services added a comment - Commit 1523470 from Robert Muir in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1523470 ] LUCENE-5207 : lucene expressions module
        Hide
        ASF subversion and git services added a comment -

        Commit 1523471 from Robert Muir in branch 'dev/branches/lucene5207'
        [ https://svn.apache.org/r1523471 ]

        LUCENE-5207: remove branch

        Show
        ASF subversion and git services added a comment - Commit 1523471 from Robert Muir in branch 'dev/branches/lucene5207' [ https://svn.apache.org/r1523471 ] LUCENE-5207 : remove branch
        Hide
        Robert Muir added a comment -

        Thanks Ryan!

        Show
        Robert Muir added a comment - Thanks Ryan!
        Robert Muir made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 5.0 [ 12321663 ]
        Fix Version/s 4.6 [ 12324999 ]
        Resolution Fixed [ 1 ]
        Hide
        ASF subversion and git services added a comment -

        Commit 1524859 from Steve Rowe in branch 'dev/trunk'
        [ https://svn.apache.org/r1524859 ]

        LUCENE-5207: Intellij config for the new expressions module: add Ant support and whole-module JUnit run configuration

        Show
        ASF subversion and git services added a comment - Commit 1524859 from Steve Rowe in branch 'dev/trunk' [ https://svn.apache.org/r1524859 ] LUCENE-5207 : Intellij config for the new expressions module: add Ant support and whole-module JUnit run configuration
        Hide
        ASF subversion and git services added a comment -

        Commit 1524860 from Steve Rowe in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1524860 ]

        LUCENE-5207: Intellij config for the new expressions module: add Ant support and whole-module JUnit run configuration (merged trunk r1524859)

        Show
        ASF subversion and git services added a comment - Commit 1524860 from Steve Rowe in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1524860 ] LUCENE-5207 : Intellij config for the new expressions module: add Ant support and whole-module JUnit run configuration (merged trunk r1524859)
        Hide
        ASF subversion and git services added a comment -

        Commit 1525194 from Uwe Schindler in branch 'dev/trunk'
        [ https://svn.apache.org/r1525194 ]

        LUCENE-5207: Add a test that checks if the stack trace of an exception thrown from a Javascript function contains the original expression source code as the "filename".

        Show
        ASF subversion and git services added a comment - Commit 1525194 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1525194 ] LUCENE-5207 : Add a test that checks if the stack trace of an exception thrown from a Javascript function contains the original expression source code as the "filename".
        Hide
        ASF subversion and git services added a comment -

        Commit 1525195 from Uwe Schindler in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1525195 ]

        Merged revision(s) 1525194 from lucene/dev/trunk:
        LUCENE-5207: Add a test that checks if the stack trace of an exception thrown from a Javascript function contains the original expression source code as the "filename".

        Show
        ASF subversion and git services added a comment - Commit 1525195 from Uwe Schindler in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1525195 ] Merged revision(s) 1525194 from lucene/dev/trunk: LUCENE-5207 : Add a test that checks if the stack trace of an exception thrown from a Javascript function contains the original expression source code as the "filename".
        Hide
        ASF subversion and git services added a comment -

        Commit 1556508 from Michael McCandless in branch 'dev/branches/lucene5376'
        [ https://svn.apache.org/r1556508 ]

        LUCENE-5207, LUCENE-5376: add expressions support to lucene server, so you can define a virtual field from any JS expression and then sort by that field or retrieve its values for all hits

        Show
        ASF subversion and git services added a comment - Commit 1556508 from Michael McCandless in branch 'dev/branches/lucene5376' [ https://svn.apache.org/r1556508 ] LUCENE-5207 , LUCENE-5376 : add expressions support to lucene server, so you can define a virtual field from any JS expression and then sort by that field or retrieve its values for all hits
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2d 18h 46m 1 Robert Muir 15/Sep/13 19:17

          People

          • Assignee:
            Unassigned
            Reporter:
            Ryan Ernst
          • Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development