0

I have a pattern ".TP-V." which returns strings like "SSTP-VPN". But the pattern ".SSH." Does not return anything, although there are lines like "core:Login:SSH:Cisco". I have no idea what pattern is need.

1

1 Answer 1

1

You need to use ".*SSH.*" instead of ".SSH.". Adding a working example -

Index Data:

{
    "name":"core:Login:SSH:Cisco"
}
{
    "name":"SSTP-VPN"
}

Search Query:

{
  "query": {
    "regexp": {
      "name.keyword": {
        "value": ".*SSH.*"
      }
    }
  }
}

Search Result:

"hits": [
      {
        "_index": "68015371",
        "_type": "_doc",
        "_id": "2",
        "_score": 1.0,
        "_source": {
          "name": "core:Login:SSH:Cisco"
        }
      }
    ]

Search Query:

{
  "query": {
    "regexp": {
      "name.keyword": {
        "value": ".*TP-V.*"
      }
    }
  }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.