You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/18 14:25:00 UTC

[jira] [Commented] (NUTCH-2663) Improve index-jexl-filter syntax for scripts

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

ASF GitHub Bot commented on NUTCH-2663:
---------------------------------------

jorgelbg opened a new pull request #400: NUTCH-2663 Improve the JEXL syntax for getting values from the context
URL: https://github.com/apache/nutch/pull/400
 
 
   * Avoids the use of the array notation when getting values from the document/metadata(s) on the JEXL expression. We go from `doc.lang[0] == 'en'` to `doc.lang == 'en'` which is more easy to understand.
   
   * Log using errors instead of warnings in the `setConf` methods. We throw a `RuntimeException` if something is wrong, so the log should represent the same severity level.
   
   * Some minor changes an additional comments.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Improve index-jexl-filter syntax for scripts
> --------------------------------------------
>
>                 Key: NUTCH-2663
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2663
>             Project: Nutch
>          Issue Type: Improvement
>          Components: plugin
>    Affects Versions: 1.16
>            Reporter: Jorge Luis Betancourt Gonzalez
>            Assignee: Jorge Luis Betancourt Gonzalez
>            Priority: Minor
>
> JEXL scripts need to be written using the array syntax to get the actual value (for instance, example extracted from the tests):
> {code}
> doc.lang[0]=='en'
> {code}
> Ideally, this would only be required if the actual value is really an array, and not for single value elements.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)