Search for a string within a specific field

Hi,

In dev tools, how do I search for documents in the 'example' index where the 'test' field contains the string 'abc'. The field will consist of other characters but must contain 'abc'.

Thanks

hi @ghouston10,

seems similar to this question: Search for a substring within a specific field

you can use the lucene syntax here.

GET /example/_search?q=test:abc*

For more advanced matching, you can look at the regexp matcher. See here for details: wildcard and regexp Queries | Elasticsearch: The Definitive Guide [2.x] | Elastic

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