Why one of the field of response has “_id” field's value?












0















I'm working on Elasticsearch Java API, and I faced weird problem.



below is the data stored:



"_index": "my_index",
"_type": "SEC",
"_id": "1111111111111111",
"_score": 0,
"_source": {
"LOG_NO": 2222222222222222
}


And I call the request like below:



QueryBuilder queryBuilder = QueryBuilders.boolQuery().filter(query);
request.setQuery(queryBuilder);
SearchResponse searchResponse = request.get();


This is the search response:



"_index":"my_index",
"_type":"SEC",
"_id":"1111111111111111",
"_score":null,
"_source": {
"LOG_NO":1111111111111111,
}


As you can see, the "LOG_NO" of the response should be '2222222222222222' not '1111111111111111'.



the parameter 'query' is QueryBuilder and value is like below:



{
"bool": {
"must": [
{
"range": {
"LOG_GEN_TIME": {
"from": "2018-11-01 00:00:00+09:00",
"to": "2018-11-01 23:59:59+09:00",
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"bool": {
"must": [
{
"term": {
"ASSET_IP": "xx.xxx.xxx.xxx"
}
},
{
"term": {
"DST_PORT": "xx"
}
}
]
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}


I don't understand what is the problem.



Any comments would be appreciated, Thanks.



-- Edited for @Val



    "_index": "my_index",
"_type": "SEC",
"_id": "9197340043548295192",
"_score": null,
"_source": {
"ASSET_IP": "xx.xxx.xx.xxx",
"LOG_NO": 9197340043548295200,
"LOG_GEN_TIME": "2018-11-01 23:10:53+09:00",
"SRC_IP": "xx.xxx.xx.xxx",
"SRC_PORT": xx,
"DST_IP": "xx.xxx.xx.xxx",
"DST_PORT": xx,
"DESCRIPTION": "log",
"DST_NATION_CD": "USA",
}
}


this is the full document that I expect to be returned and the only "LOG_NO" field makes problem.










share|improve this question




















  • 1





    Can you show the query you're sending and how you're sending it?

    – Val
    Nov 23 '18 at 9:04











  • @Val added the parameter query, and I'm not sure 'how you're sending it' means exactly

    – qumm
    Nov 23 '18 at 9:19






  • 1





    Thanks for the query, can you show the full document that you expect to be returned by the query (i.e. not only the LOG_NO field)?

    – Val
    Nov 23 '18 at 9:37











  • @Val added the full doc, and sorry for the late response :)

    – qumm
    Nov 26 '18 at 1:33











  • Found my problem. thanks for helping me @Val

    – qumm
    Nov 26 '18 at 4:24
















0















I'm working on Elasticsearch Java API, and I faced weird problem.



below is the data stored:



"_index": "my_index",
"_type": "SEC",
"_id": "1111111111111111",
"_score": 0,
"_source": {
"LOG_NO": 2222222222222222
}


And I call the request like below:



QueryBuilder queryBuilder = QueryBuilders.boolQuery().filter(query);
request.setQuery(queryBuilder);
SearchResponse searchResponse = request.get();


This is the search response:



"_index":"my_index",
"_type":"SEC",
"_id":"1111111111111111",
"_score":null,
"_source": {
"LOG_NO":1111111111111111,
}


As you can see, the "LOG_NO" of the response should be '2222222222222222' not '1111111111111111'.



the parameter 'query' is QueryBuilder and value is like below:



{
"bool": {
"must": [
{
"range": {
"LOG_GEN_TIME": {
"from": "2018-11-01 00:00:00+09:00",
"to": "2018-11-01 23:59:59+09:00",
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"bool": {
"must": [
{
"term": {
"ASSET_IP": "xx.xxx.xxx.xxx"
}
},
{
"term": {
"DST_PORT": "xx"
}
}
]
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}


I don't understand what is the problem.



Any comments would be appreciated, Thanks.



-- Edited for @Val



    "_index": "my_index",
"_type": "SEC",
"_id": "9197340043548295192",
"_score": null,
"_source": {
"ASSET_IP": "xx.xxx.xx.xxx",
"LOG_NO": 9197340043548295200,
"LOG_GEN_TIME": "2018-11-01 23:10:53+09:00",
"SRC_IP": "xx.xxx.xx.xxx",
"SRC_PORT": xx,
"DST_IP": "xx.xxx.xx.xxx",
"DST_PORT": xx,
"DESCRIPTION": "log",
"DST_NATION_CD": "USA",
}
}


this is the full document that I expect to be returned and the only "LOG_NO" field makes problem.










share|improve this question




















  • 1





    Can you show the query you're sending and how you're sending it?

    – Val
    Nov 23 '18 at 9:04











  • @Val added the parameter query, and I'm not sure 'how you're sending it' means exactly

    – qumm
    Nov 23 '18 at 9:19






  • 1





    Thanks for the query, can you show the full document that you expect to be returned by the query (i.e. not only the LOG_NO field)?

    – Val
    Nov 23 '18 at 9:37











  • @Val added the full doc, and sorry for the late response :)

    – qumm
    Nov 26 '18 at 1:33











  • Found my problem. thanks for helping me @Val

    – qumm
    Nov 26 '18 at 4:24














0












0








0


1






I'm working on Elasticsearch Java API, and I faced weird problem.



below is the data stored:



"_index": "my_index",
"_type": "SEC",
"_id": "1111111111111111",
"_score": 0,
"_source": {
"LOG_NO": 2222222222222222
}


And I call the request like below:



QueryBuilder queryBuilder = QueryBuilders.boolQuery().filter(query);
request.setQuery(queryBuilder);
SearchResponse searchResponse = request.get();


This is the search response:



"_index":"my_index",
"_type":"SEC",
"_id":"1111111111111111",
"_score":null,
"_source": {
"LOG_NO":1111111111111111,
}


As you can see, the "LOG_NO" of the response should be '2222222222222222' not '1111111111111111'.



the parameter 'query' is QueryBuilder and value is like below:



{
"bool": {
"must": [
{
"range": {
"LOG_GEN_TIME": {
"from": "2018-11-01 00:00:00+09:00",
"to": "2018-11-01 23:59:59+09:00",
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"bool": {
"must": [
{
"term": {
"ASSET_IP": "xx.xxx.xxx.xxx"
}
},
{
"term": {
"DST_PORT": "xx"
}
}
]
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}


I don't understand what is the problem.



Any comments would be appreciated, Thanks.



-- Edited for @Val



    "_index": "my_index",
"_type": "SEC",
"_id": "9197340043548295192",
"_score": null,
"_source": {
"ASSET_IP": "xx.xxx.xx.xxx",
"LOG_NO": 9197340043548295200,
"LOG_GEN_TIME": "2018-11-01 23:10:53+09:00",
"SRC_IP": "xx.xxx.xx.xxx",
"SRC_PORT": xx,
"DST_IP": "xx.xxx.xx.xxx",
"DST_PORT": xx,
"DESCRIPTION": "log",
"DST_NATION_CD": "USA",
}
}


this is the full document that I expect to be returned and the only "LOG_NO" field makes problem.










share|improve this question
















I'm working on Elasticsearch Java API, and I faced weird problem.



below is the data stored:



"_index": "my_index",
"_type": "SEC",
"_id": "1111111111111111",
"_score": 0,
"_source": {
"LOG_NO": 2222222222222222
}


And I call the request like below:



QueryBuilder queryBuilder = QueryBuilders.boolQuery().filter(query);
request.setQuery(queryBuilder);
SearchResponse searchResponse = request.get();


This is the search response:



"_index":"my_index",
"_type":"SEC",
"_id":"1111111111111111",
"_score":null,
"_source": {
"LOG_NO":1111111111111111,
}


As you can see, the "LOG_NO" of the response should be '2222222222222222' not '1111111111111111'.



the parameter 'query' is QueryBuilder and value is like below:



{
"bool": {
"must": [
{
"range": {
"LOG_GEN_TIME": {
"from": "2018-11-01 00:00:00+09:00",
"to": "2018-11-01 23:59:59+09:00",
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"bool": {
"must": [
{
"term": {
"ASSET_IP": "xx.xxx.xxx.xxx"
}
},
{
"term": {
"DST_PORT": "xx"
}
}
]
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}


I don't understand what is the problem.



Any comments would be appreciated, Thanks.



-- Edited for @Val



    "_index": "my_index",
"_type": "SEC",
"_id": "9197340043548295192",
"_score": null,
"_source": {
"ASSET_IP": "xx.xxx.xx.xxx",
"LOG_NO": 9197340043548295200,
"LOG_GEN_TIME": "2018-11-01 23:10:53+09:00",
"SRC_IP": "xx.xxx.xx.xxx",
"SRC_PORT": xx,
"DST_IP": "xx.xxx.xx.xxx",
"DST_PORT": xx,
"DESCRIPTION": "log",
"DST_NATION_CD": "USA",
}
}


this is the full document that I expect to be returned and the only "LOG_NO" field makes problem.







java elasticsearch






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 26 '18 at 1:31







qumm

















asked Nov 23 '18 at 7:57









qummqumm

555




555








  • 1





    Can you show the query you're sending and how you're sending it?

    – Val
    Nov 23 '18 at 9:04











  • @Val added the parameter query, and I'm not sure 'how you're sending it' means exactly

    – qumm
    Nov 23 '18 at 9:19






  • 1





    Thanks for the query, can you show the full document that you expect to be returned by the query (i.e. not only the LOG_NO field)?

    – Val
    Nov 23 '18 at 9:37











  • @Val added the full doc, and sorry for the late response :)

    – qumm
    Nov 26 '18 at 1:33











  • Found my problem. thanks for helping me @Val

    – qumm
    Nov 26 '18 at 4:24














  • 1





    Can you show the query you're sending and how you're sending it?

    – Val
    Nov 23 '18 at 9:04











  • @Val added the parameter query, and I'm not sure 'how you're sending it' means exactly

    – qumm
    Nov 23 '18 at 9:19






  • 1





    Thanks for the query, can you show the full document that you expect to be returned by the query (i.e. not only the LOG_NO field)?

    – Val
    Nov 23 '18 at 9:37











  • @Val added the full doc, and sorry for the late response :)

    – qumm
    Nov 26 '18 at 1:33











  • Found my problem. thanks for helping me @Val

    – qumm
    Nov 26 '18 at 4:24








1




1





Can you show the query you're sending and how you're sending it?

– Val
Nov 23 '18 at 9:04





Can you show the query you're sending and how you're sending it?

– Val
Nov 23 '18 at 9:04













@Val added the parameter query, and I'm not sure 'how you're sending it' means exactly

– qumm
Nov 23 '18 at 9:19





@Val added the parameter query, and I'm not sure 'how you're sending it' means exactly

– qumm
Nov 23 '18 at 9:19




1




1





Thanks for the query, can you show the full document that you expect to be returned by the query (i.e. not only the LOG_NO field)?

– Val
Nov 23 '18 at 9:37





Thanks for the query, can you show the full document that you expect to be returned by the query (i.e. not only the LOG_NO field)?

– Val
Nov 23 '18 at 9:37













@Val added the full doc, and sorry for the late response :)

– qumm
Nov 26 '18 at 1:33





@Val added the full doc, and sorry for the late response :)

– qumm
Nov 26 '18 at 1:33













Found my problem. thanks for helping me @Val

– qumm
Nov 26 '18 at 4:24





Found my problem. thanks for helping me @Val

– qumm
Nov 26 '18 at 4:24












1 Answer
1






active

oldest

votes


















0














I found that the problem is javascript.



Because JS can't express the parameter that exceed the range of number, it was transformed.



My ES setting was the integer field "LOG_NO" is set as a index and the "_id" is string expression of "LOG_NO".



So there was no problem, except the integer number looks different on web.



Hope others would not suffer the same problem.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53442667%2fwhy-one-of-the-field-of-response-has-id-fields-value%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I found that the problem is javascript.



    Because JS can't express the parameter that exceed the range of number, it was transformed.



    My ES setting was the integer field "LOG_NO" is set as a index and the "_id" is string expression of "LOG_NO".



    So there was no problem, except the integer number looks different on web.



    Hope others would not suffer the same problem.






    share|improve this answer




























      0














      I found that the problem is javascript.



      Because JS can't express the parameter that exceed the range of number, it was transformed.



      My ES setting was the integer field "LOG_NO" is set as a index and the "_id" is string expression of "LOG_NO".



      So there was no problem, except the integer number looks different on web.



      Hope others would not suffer the same problem.






      share|improve this answer


























        0












        0








        0







        I found that the problem is javascript.



        Because JS can't express the parameter that exceed the range of number, it was transformed.



        My ES setting was the integer field "LOG_NO" is set as a index and the "_id" is string expression of "LOG_NO".



        So there was no problem, except the integer number looks different on web.



        Hope others would not suffer the same problem.






        share|improve this answer













        I found that the problem is javascript.



        Because JS can't express the parameter that exceed the range of number, it was transformed.



        My ES setting was the integer field "LOG_NO" is set as a index and the "_id" is string expression of "LOG_NO".



        So there was no problem, except the integer number looks different on web.



        Hope others would not suffer the same problem.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 26 '18 at 4:24









        qummqumm

        555




        555






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53442667%2fwhy-one-of-the-field-of-response-has-id-fields-value%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'