Search for a string within a specific field

(gearoid houston) #1


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'.


(Thomas Neirynck) #2

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:

(system) #3

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