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

Ryan Ernst commented on LUCENE-5806:
------------------------------------

I only added tests from the compiler side, but I can add one with bindings 
actually using extended variables.  It would continue to show up to bindings as 
a string name, which the binding would have to parse.

I thought about using the parser to break up the "variable" into components, 
and passing a variable context to the bindings instead of (or alternatively to) 
the simple string variable names.  It might be a little more efficient (since 
the parser has to find these pieces anyways when matching), but I opted for 
simplicity for now (let the bindings parse as they like).  In either case, the 
cost is still occurred once (at the beginning of an evaluate() call) and not 
per document.

> Extend expression grammar to allow advanced "variables"
> -------------------------------------------------------
>
>                 Key: LUCENE-5806
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5806
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Ryan Ernst
>         Attachments: LUCENE-5806.patch
>
>
> We currently allow dots in "variable" names in expressions, so that we can 
> fake out object access.  We should extend this to allow array access as well 
> (both integer and string keys).  This would allow faking out full object 
> nesting through bindings.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to