Searching specific fields

I have a document with a field called request which stores the path component of the URL. I'd like to find all documents where field contains a substring. For example, consider a document containing the following request field.

"request": "app/profile/form/index.html"

From the docs it seems like I should be able to search request: form to find all documents where the request field contains form. However, this search is actually matching form on any field. How can I search for form on only the request field?

Your lucene query syntax looks correct. What is the ES mapping for the request field

Hi, @Nathan_Reese. Thanks for responding. Here's the mapping of the request field:

"request": {
  "type": "text",
  "fields": {
    "keyword": {
      "type": "keyword",
      "ignore_above": 256

What does the Elasticsearch request look like? In the lower left corner of the visualization, click the toggle spy panel button. Look at the request for the visualization. Do you see your filter in the request?

I'm actually using discover rather than visualizations; however, I don't see that button in either view.

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