How to query string for (contains this, also contains that, but shouldnt include these words)

I have a string in elastic search. It looks like this

GET "/user/685934468/api/v1/tables/funds_raised_map_by_region_1"

String is an HTTP RESTFul data endpoint with a breakdown like so
GET /user/"numerical user ID"/api/v1/tables/"dataset name"

I need to query elastic via the Python API's with the logic like so

  1. string must contain /user/
  2. string must contain /api/v1/tables/
  3. string must_not contain this [] array of known dataset names.

Basically I am looking for strings that contain unknown dataset names.

The queries I have written dont return me the correct results. Its missing some.

FYI, I can query for all strings with /user/ and /api/v1/tables/ because the results are in the >10,000. All strings are HTTP request strings from Logstash and Kibana. I am not sure if there is a string analyzer on those entries (not sure I know what I am talking about for string analyzer)

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