elastic search type text does not give the result for match queryTreat child as field of parent in elastic search queryElastic search: Query for complex scenarioIs match query case sensitive in elasticsearch?Term Query Doesn't give Proper ResultRange Query on a score returned by match Query in Elastic SearchElastic search bool queryUsing both term and match query on same text field?Extract data based on some field values from elastic searchElastic Search different fieldElastic Search Exact Match - wrong results

Installed Tankless Water Heater - Internet loss when active

Are these reasonable traits for someone with autism?

Does Nitrogen inside commercial airliner wheels prevent blowouts on touchdown?

number headings

What is the object moving across the ceiling in this stock footage?

Alignment: "Breaking out" of environment (enumerate / minipage)

using Leibniz rule to solve definite integral

Why would Ryanair allow me to book this journey through a third party, but not through their own website?

Is the field of q-series 'dead'?

Plot and find intersection points of multiple curves

Looking for a soft substance that doesn't dissolve underwater

I know that there is a preselected candidate for a position to be filled at my department. What should I do?

How to Pin Point Large File eating space in Fedora 18

Could a 19.25mm revolver actually exist?

What is a Centaur Thief's climbing speed?

Where is the logic in castrating fighters?

How to deal with a colleague who is being aggressive?

Would Jetfuel for a modern jet like an F-16 or a F-35 be producable in the WW2 era?

Is the taxi route omitted in low visibility (LVP)?

Caught 2 students cheating together on the final exam that I proctored

Can a person survive on blood in place of water?

Why aren't space telescopes put in GEO?

Why didn't Thanos use the Time Stone to stop the Avengers' plan?

Is the derivative with respect to a fermion field Grassmann-odd?



elastic search type text does not give the result for match query


Treat child as field of parent in elastic search queryElastic search: Query for complex scenarioIs match query case sensitive in elasticsearch?Term Query Doesn't give Proper ResultRange Query on a score returned by match Query in Elastic SearchElastic search bool queryUsing both term and match query on same text field?Extract data based on some field values from elastic searchElastic Search different fieldElastic Search Exact Match - wrong results






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have performed two queries



For first mapping is as shown here :



"customer_details": 
"mappings":
"pan_details":
"properties":
"city":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"college":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"customer_mame":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"doc_url":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"pan_no":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256









for this when I write



 
"query":
"match":
"pan_no":"ABCDFGGG"





it gives me the result.



But when I am giving the mapping as shown below:




"customer_details":
"mappings":
"pan_details":
"properties":
"city":
"type": "text"
,
"college":
"type": "text"
,
"customer_name":
"type": "text"
,
"doc_url":
"type": "text"
,
"pan_no":
"type": "text"








and the query as :



 
"query":
"match":
"pan_no":"ABCDFGGG"





it does not give me result at all.



The sample document is as given below :




"customer_mame": "Marcus Rodriguez",
"pan_no": "ABCDEGFTY",
"city": "San Fransisco",
"college": "UCSB",
"doc_url": [
"www.google.com",
"www.facebook.com",
"www.twitter.com"
]



Now when I enter pan_no as ABCD something it should return me the above document.










share|improve this question
























  • can you show a document that is supposed to match?

    – Val
    Mar 24 at 7:14

















0















I have performed two queries



For first mapping is as shown here :



"customer_details": 
"mappings":
"pan_details":
"properties":
"city":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"college":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"customer_mame":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"doc_url":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"pan_no":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256









for this when I write



 
"query":
"match":
"pan_no":"ABCDFGGG"





it gives me the result.



But when I am giving the mapping as shown below:




"customer_details":
"mappings":
"pan_details":
"properties":
"city":
"type": "text"
,
"college":
"type": "text"
,
"customer_name":
"type": "text"
,
"doc_url":
"type": "text"
,
"pan_no":
"type": "text"








and the query as :



 
"query":
"match":
"pan_no":"ABCDFGGG"





it does not give me result at all.



The sample document is as given below :




"customer_mame": "Marcus Rodriguez",
"pan_no": "ABCDEGFTY",
"city": "San Fransisco",
"college": "UCSB",
"doc_url": [
"www.google.com",
"www.facebook.com",
"www.twitter.com"
]



Now when I enter pan_no as ABCD something it should return me the above document.










share|improve this question
























  • can you show a document that is supposed to match?

    – Val
    Mar 24 at 7:14













0












0








0








I have performed two queries



For first mapping is as shown here :



"customer_details": 
"mappings":
"pan_details":
"properties":
"city":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"college":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"customer_mame":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"doc_url":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"pan_no":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256









for this when I write



 
"query":
"match":
"pan_no":"ABCDFGGG"





it gives me the result.



But when I am giving the mapping as shown below:




"customer_details":
"mappings":
"pan_details":
"properties":
"city":
"type": "text"
,
"college":
"type": "text"
,
"customer_name":
"type": "text"
,
"doc_url":
"type": "text"
,
"pan_no":
"type": "text"








and the query as :



 
"query":
"match":
"pan_no":"ABCDFGGG"





it does not give me result at all.



The sample document is as given below :




"customer_mame": "Marcus Rodriguez",
"pan_no": "ABCDEGFTY",
"city": "San Fransisco",
"college": "UCSB",
"doc_url": [
"www.google.com",
"www.facebook.com",
"www.twitter.com"
]



Now when I enter pan_no as ABCD something it should return me the above document.










share|improve this question
















I have performed two queries



For first mapping is as shown here :



"customer_details": 
"mappings":
"pan_details":
"properties":
"city":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"college":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"customer_mame":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"doc_url":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256


,
"pan_no":
"type": "text",
"fields":
"keyword":
"type": "keyword",
"ignore_above": 256









for this when I write



 
"query":
"match":
"pan_no":"ABCDFGGG"





it gives me the result.



But when I am giving the mapping as shown below:




"customer_details":
"mappings":
"pan_details":
"properties":
"city":
"type": "text"
,
"college":
"type": "text"
,
"customer_name":
"type": "text"
,
"doc_url":
"type": "text"
,
"pan_no":
"type": "text"








and the query as :



 
"query":
"match":
"pan_no":"ABCDFGGG"





it does not give me result at all.



The sample document is as given below :




"customer_mame": "Marcus Rodriguez",
"pan_no": "ABCDEGFTY",
"city": "San Fransisco",
"college": "UCSB",
"doc_url": [
"www.google.com",
"www.facebook.com",
"www.twitter.com"
]



Now when I enter pan_no as ABCD something it should return me the above document.







elasticsearch






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 24 at 7:42







Mrugesh Thaker

















asked Mar 24 at 4:05









Mrugesh ThakerMrugesh Thaker

2,01021838




2,01021838












  • can you show a document that is supposed to match?

    – Val
    Mar 24 at 7:14

















  • can you show a document that is supposed to match?

    – Val
    Mar 24 at 7:14
















can you show a document that is supposed to match?

– Val
Mar 24 at 7:14





can you show a document that is supposed to match?

– Val
Mar 24 at 7:14












1 Answer
1






active

oldest

votes


















0














Not sure why you are getting different results for the above mappings. Basically, both the mappings should produce the same results as they are same for the field pan_no. I have tested your above mappings in my local environment and I am getting the same results. The default analyzer to text type is Standard Analyzer and would give the result for the query(according to your sample data):



 
"query":
"match":
"pan_no":"ABCDEGFTY"






Now when I enter pan_no as ABCD something it should return me the
above document.




pan_no as ABCD won't result in any data for your sample as default analyzer is Standard analyzer.






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%2f55320640%2felastic-search-type-text-does-not-give-the-result-for-match-query%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














    Not sure why you are getting different results for the above mappings. Basically, both the mappings should produce the same results as they are same for the field pan_no. I have tested your above mappings in my local environment and I am getting the same results. The default analyzer to text type is Standard Analyzer and would give the result for the query(according to your sample data):



     
    "query":
    "match":
    "pan_no":"ABCDEGFTY"






    Now when I enter pan_no as ABCD something it should return me the
    above document.




    pan_no as ABCD won't result in any data for your sample as default analyzer is Standard analyzer.






    share|improve this answer





























      0














      Not sure why you are getting different results for the above mappings. Basically, both the mappings should produce the same results as they are same for the field pan_no. I have tested your above mappings in my local environment and I am getting the same results. The default analyzer to text type is Standard Analyzer and would give the result for the query(according to your sample data):



       
      "query":
      "match":
      "pan_no":"ABCDEGFTY"






      Now when I enter pan_no as ABCD something it should return me the
      above document.




      pan_no as ABCD won't result in any data for your sample as default analyzer is Standard analyzer.






      share|improve this answer



























        0












        0








        0







        Not sure why you are getting different results for the above mappings. Basically, both the mappings should produce the same results as they are same for the field pan_no. I have tested your above mappings in my local environment and I am getting the same results. The default analyzer to text type is Standard Analyzer and would give the result for the query(according to your sample data):



         
        "query":
        "match":
        "pan_no":"ABCDEGFTY"






        Now when I enter pan_no as ABCD something it should return me the
        above document.




        pan_no as ABCD won't result in any data for your sample as default analyzer is Standard analyzer.






        share|improve this answer















        Not sure why you are getting different results for the above mappings. Basically, both the mappings should produce the same results as they are same for the field pan_no. I have tested your above mappings in my local environment and I am getting the same results. The default analyzer to text type is Standard Analyzer and would give the result for the query(according to your sample data):



         
        "query":
        "match":
        "pan_no":"ABCDEGFTY"






        Now when I enter pan_no as ABCD something it should return me the
        above document.




        pan_no as ABCD won't result in any data for your sample as default analyzer is Standard analyzer.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 24 at 10:06

























        answered Mar 24 at 9:59









        Yashasvi Raj PantYashasvi Raj Pant

        3101316




        3101316





























            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%2f55320640%2felastic-search-type-text-does-not-give-the-result-for-match-query%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

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript