Not able to query a wildcard

Hi, I'm trying to query a document where it has field mapping_type and product.categories[0].name field which I want to query it using a wildcard.

I tried to run the query in this way:

GET /products/_search
{
    "query": {
        "bool": {
            "must": [
                {
                    "match": {
                        "mapping_type": "house_products"
                    }
                },
                {
                    "wildcard": {
                       "product.categories[0].name": {
                           "value": "Ma*"
                       }
                    }
                }
            ]
        }
    }
}

But I didn't get any results. It has documents with product.categories[0].name starting with prefix Ma (verified)

How should I query the desired documents using these two fields?

It would great if anyone can help me with this issue.

Read this and specifically the "Also be patient" part.

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

May be try ma* instead of Ma* in the meantime.

This solution is not working.

Then share a full script as I asked.
We can start from there.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.