GitHub user bbonnin opened a pull request:

    https://github.com/apache/incubator-zeppelin/pull/845

    [ZEPPELIN-817] Fix issue for queries containing a 'fields' parameter

    ### What is this PR for?
    It is a bug fix for search queries that use a fields parameter (cf. 
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-fields.html).
    An error was displayed.
    
    ### What type of PR is it?
    Bug Fix
    
    ### Todos
    * [X ] - ElasticsearchInterpreter : check if the result is in the '_source' 
part or in the 'fields' part of the response
    * [X] - Add a unit test for this case
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-817
    
    
    ### How should this be tested?
    Use the elasticsearch interpreter and type a search query such as : search 
/ {"fields":["date", "request.headers"],"query":{"match": {"status":404}
    
    Before the fix, there was an error : "Error : string is null"
    
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update? NO
    * Is there breaking changes for older versions? NO
    * Does this needs documentation? NO
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bbonnin/incubator-zeppelin master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-zeppelin/pull/845.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #845
    
----
commit c78688a26c0ea7d73840c4f2cac00e509d065ad4
Author: Bruno Bonnin <[email protected]>
Date:   2016-04-20T10:33:08Z

    Fix issue when a query contains 'fields' field

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to