Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8028883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:15:50+00:00 2026-06-05T00:15:50+00:00

This is my question related to my previous question that I asked search stops

  • 0

This is my question related to my previous question that I asked search stops after the first match

Here I am giving you the mapping.

{
    "copy_order_snapshot": {
        "properties": {
            "line_item_info": {
                "dynamic": "true",
                "properties": {
                    "m_product_details": {
                        "dynamic": "true",
                        "properties": {
                            "accessories_colour": {
                                "type": "string"
                            },
                            "status": {
                                "type": "string"
                            }
                        }
                    },
                    "other_details": {
                        "dynamic": "true",
                        "properties": {
                            "accessories_material_type": {
                                "type": "string"
                            }
                            "status": {
                                "type": "string"
                            }
                        }
                    },
                    "product_details": {
                        "dynamic": "true",
                        "properties": {
                            "accessories_colour": {
                                "type": "string"
                            },
                            "status": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "order_data": {
                "dynamic": "true",
                "properties": {
                    "state": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    }                    
                }
            }
        }
    }
}

In my previous question I was talking about attribute_set_id , here the same case is with status. The order_details->status is "enabled" while the other status are as "1" and "canceled". When I search for

{
    "query":{
        "term":{
            "status":"enabled"
         }
    }
}

I get the result

but if I search for

{
    "query":{
        "term":{
            "status":"1"
        }
    }
}

or

{
    "query":{
        "term":{
            "status":"canceled"
        }
    }
}

I get no results.

Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:15:52+00:00Added an answer on June 5, 2026 at 12:15 am

    It happens because of ambiguous field name “status”. During query processing, elasticsearch resolves the field name “status” into the first fully qualified field name that it matches. When I ran it on my machine, it got resolved into line_item_info.other_details.status.

    $ curl "localhost:9200/test-orders/_validate/query?q=status:blah&explain=true&pretty=true"
    {
      "valid" : true,
      "_shards" : {
        "total" : 1,
        "successful" : 1,
        "failed" : 0
      },
      "explanations" : [ {
        "index" : "test-orders",
        "valid" : true,
        "explanation" : "line_item_info.other_details.status:blah"
      } ]
    }
    

    If you want your query to match all status fields, you might need to use fully qualified names (such as line_item_info.other_details.status, line_item_info.m_product_details.status, etc.) and combine them using Dis Max or Bool Queries.

    For example:

    $ curl -XGET http://localhost:9200/test-orders/copy_order_snapshot/_search -d '{
        "query":{
            "bool" : {
                "should" : [
                    {
                        "term" : { "line_item_info.m_product_details.status" : "1" }
                    },
                    {
                        "term" : { "line_item_info.other_details.status" : "enabled" }
                    }
                ]
            }
        }
    }'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is related to a previous question of mine That's my current code
This question is related to a previous question I asked, but it's a different.
This is closely related to a previous question i asked. I have a many-to-many
This question is related to my previous question in that question I used color
This is semi-related to my previous question . As that previous question states, I
I asked this question earlier: mod_rewrite: match only if no previous rules have matched?
This question is related to a previous post of mine Here . Basically, I
I just asked an SQL related question, and the first answer was: This is
This question is related to my previous post Image Processing Algorithm in Matlab in
This question is related to my previous question How to generate Cartesian Coordinate (x,y)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.