John Lippson
John Lippson

Reputation: 1329

Elasticsearch searching all fields containing a value?

{
  "from" : 0,
  "size" : 1000,
  "query" : {
    "bool" : {
      "must" : {
        "wildcard" : {
          "_all" : "*tunnel*"
        }
      }
    }
  }
}

I'm trying to execute a query to search all fields containing the phrase tunnel. I have titles called tunnel.xml and get no results. What am I missing here?

Upvotes: 0

Views: 69

Answers (1)

Ashraful Islam
Ashraful Islam

Reputation: 12840

Try Query String Query

GET data/Company/_search
{
  "query": {
    "query_string": {
      "query": "*tunnel*"
    }
  }
}

Upvotes: 1

Related Questions