Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TermsFacet across index returns wrong results (0.90) #2797

Closed
synhershko opened this issue Mar 18, 2013 · 4 comments
Closed

TermsFacet across index returns wrong results (0.90) #2797

synhershko opened this issue Mar 18, 2013 · 4 comments

Comments

@synhershko
Copy link
Contributor

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
          }
        }
      }
    }
  }
}
@dadoonet
Copy link
Member

IMHO, that's somehow the same issue as #1305, isn't it?

@synhershko
Copy link
Contributor Author

I'm familiar with that issue, but people are reporting there single shards of multiple indexes works for them, and use that approach as a workaround. If this indeed is the same issue, this becomes a regression issue.

Either way, we would really like to have this fixed...

@dadoonet
Copy link
Member

What people are reporting as far as I understand is that when your narrow your search on a single shard, you will will have the exact values. But I can be wrong here.

@clintongormley
Copy link

This is indeed a duplicate of #1305 and there is no easy fix, just workarounds:

  1. use a single shard, or
  2. request more terms than you actually need

It is the nature of distributed search...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants