Is it possible to search more than two occurrences

I want to search keyword 'elastic' in a post which contains more than two occurrences.

This is a fairly open question in that as you've written this up there's a variety of ways to approach this problem. If you'd like I'd welcome you to share more information about your problem such as your mapping, queries you've tried, and examples of your data. However, my favorite and what may work best for you is a script score query (see below for an example) Script score query | Elastic Documentation.

Alternatively, you could do a wildcard query and create a query string that includes say the word elastic at least twice.

You could do multiple queries. So you could do a standard match query, get back documents and do a filtering step on your own server. Similarly you could do a query and subsequently do a term vectors query for more information about a specific document. The downside here is of course not being able to process everything in one query and/or on the ES side.

You may even find there are some ways to leverage aggregations to achieve this but I believe would find that those aggregations produce buckets and not documents, which I'm assuming is not what you want.

As I mentioned my favorite approach to this is a script score query (Script score query | Elastic Documentation). Scripting like this has a bit of a performance impact but if you want counts anyway that's a reasonable expectation.

So for instance using script score we might have something like this:

create an index:

curl -XPUT --header 'Content-Type: application/json' "http://localhost:9200/test" -d '{
  "mappings" : {
    "properties": {  
      "some_text": {
          "type": "text"
      }
    }  
  }
}'

add three docs to it

curl -XPUT --header 'Content-Type: application/json' "http://localhost:9200/test/_doc/1?refresh" -d '{
  "some_text": "rudy rudy rudy"
}'

curl -XPUT --header 'Content-Type: application/json' "http://localhost:9200/test/_doc/2?refresh" -d '{
  "some_text": "rudy"
}'

curl -XPUT --header 'Content-Type: application/json' "http://localhost:9200/test/_doc/3?refresh" -d '{
  "some_text": "rudy floop doop rudy"
}'

query only those that contain the word rudy at least twice:

curl -XGET --header 'Content-Type: application/json' "http://localhost:9200/test/_search" -d '{
  "query": {
    "script_score": {
      "query": {
        "match": { "some_text": "rudy" }
      },
      "script": {
        "source": "_termStats.termFreq().getMax()"
      },
      "min_score": 2
    }
  }
}' | python -mjson.tool

output

{
    "took": 2,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 2,
            "relation": "eq"
        },
        "max_score": 3.0,
        "hits": [
            {
                "_index": "test",
                "_id": "1",
                "_score": 3.0,
                "_source": {
                    "some_text": "rudy rudy rudy"
                }
            },
            {
                "_index": "test",
                "_id": "3",
                "_score": 2.0,
                "_source": {
                    "some_text": "rudy floop doop rudy"
                }
            }
        ]
    }
}