Performance based on length of "terms"

I have following criteria in the query. The terms list for seen by can grow significantly large. There are also a couple of similar kind of list in "must_not" clause and those can be grow large too.

              {
                "terms": {
                  "seen_by": [
                    "54",
                    "3",
                    "418",
                    "411",
                    "1",
                    "101"
                  ]
                }
              }

What will be the performance difference if the list of terms in conditions grows or shrinks?

Thanks,
Pravin

Hard to answer with exact numbers, the performance will be slower,
obviously, as the list grows. Though, what I suggest is to use terms filter
in this case with execution mode set to bool (new in 0.19:
Elasticsearch Platform — Find real-time answers at scale | Elastic).
This means that the cached filter will be per term, and you will get a
considerably better filter cache hit ration in this case, meaning that for
common terms, it will be a complete in memory bitwise operations.

On Wed, Mar 21, 2012 at 11:46 AM, pravinhmhatre pravinhmhatre@gmail.comwrote:

I have following criteria in the query. The terms list for seen by can
grow significantly large. There are also a couple of similar kind of list
in "must_not" clause and those can be grow large too.

          {
            "terms": {
              "seen_by": [
                "54",
                "3",
                "418",
                "411",
                "1",
                "101"
              ]
            }
          }

What will be the performance difference if the list of terms in conditions
grows or shrinks? Thanks, Pravin

View this message in context: Performance based on length of "terms"http://elasticsearch-users.115913.n3.nabble.com/Performance-based-on-length-of-terms-tp3845134p3845134.html
Sent from the Elasticsearch Users mailing list archivehttp://elasticsearch-users.115913.n3.nabble.com/at Nabble.com.