Skip to content

TermsFacet across index returns wrong results (0.90) #2797

Closed
@synhershko

Description

@synhershko

When faceting on more than one index, each with one shard, no replicas, and containing the same data structure, TermsFacet will return the wrong counts. This can be easily verified by running a simple query with the facet value. Additionally, changing the size parameter will cause facet results to change (while we only expected to get a shorter/longer list , we actually see values change and terms disappear).

Our faceting query:

{
  "from" : 0,
  "size" : 0,
  "query" : {
    "filtered" : {
      "query" : {
        "query_string" : {
          "query" : "test",
          "fields" : [ "title", "topic" ]
        }
      },
      "filter" : {
        "numeric_range" : {
          "topic_date" : {
            "from" : "2012-12-17T00:00:00.000+02:00",
            "to" : "2013-03-17T23:59:59.999+02:00",
            "include_lower" : true,
            "include_upper" : true
          }
        }
      }
    }
  },
  "facets" : {
    "termFacet" : {
      "terms" : {
        "fields" : [ "author" ],
        "size" : 10
      },
      "facet_filter" : {
        "numeric_range" : {
          "topic_date" : {
            "from" : "2012-12-17T00:00:00.000+02:00",
            "to" : "2013-03-17T23:59:59.999+02:00",
            "include_lower" : true,
            "include_upper" : true
          }
        }
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions