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

When faceting on integer field using TERMS , 0.9 fails to count records where the facet field is missing #2807

Closed
roytmana opened this issue Mar 21, 2013 · 10 comments
Assignees

Comments

@roytmana
Copy link

reproduceable example:
https://gist.github.com/roytmana/5215441

sorry my curl commands could be somewhat wrong - I am on windows and not using it much

@ghost ghost assigned s1monw Mar 21, 2013
@s1monw
Copy link
Contributor

s1monw commented Mar 21, 2013

thanks for reporting this. we will look into it soon

@roytmana
Copy link
Author

thanks, note that not only missing field is not right but total field (within facets) is also less than it should be (100 vs 200 hits)

You probably do not need all 200 docs just 5 will do the job. I was just struggling to reproduce it since it appeared very erratic from my app (some facets working and some not) till I realized it is the ones on numeric fields which are broken

@clintongormley
Copy link
Contributor

@roytmana yep, the missing count is wrong. Note, the size=0 thing is not supported. See #1776

@roytmana
Copy link
Author

Hi Clint,

So size=0 is a regression relative to 0.20.5 because 0.20.5 does support it? Any chance it'll be supported in 0.9GA?

Also may I ask if there is any hope to have terms_stats support total/count (if not the rest of stats) for "missing" and "other" like terms does? It would be very helpful. Right now I decompose my terms_stats to 3 facets, terms_stats, stats with missing filter and stats for that field to calculate "complete" totals (per term, other, missing) and then recompose results back. I also have few useful and simple ideas for new facets ("logical" facets I currently use by decomposing them onto multiple ES facets and recomposing data together) just not sure it is a good time to lobby for them :-)

@s1monw
Copy link
Contributor

s1monw commented Mar 21, 2013

@roytmana can you open a sep. issue for the "size" : 0 issue please?

@s1monw s1monw closed this as completed in 075779a Mar 21, 2013
@roytmana
Copy link
Author

There is a similar issue #1776

Would you like me to open another one specifically for 0.9RC1?

@s1monw
Copy link
Contributor

s1monw commented Mar 21, 2013

@roytmana well I wonder why this one is still open if that is in 0.20.5 so lets sort that out first, can you comment?

@roytmana
Copy link
Author

I was not aware of that old issue. Clint pointed it out (see above) I as happily using it since 0.20.3 or 4

@clintongormley
Copy link
Contributor

Hiya @roytmana.

I've checked on 0.20.3-0.20.5 and specifying size:0 on a facet has never returned all terms. It has always returned zero terms. I think you must be thinking of something else?

cilnt

@roytmana
Copy link
Author

sorry you are correct I mixed it up. I was having problem with it in 0.20.3 and then moved to terms_stats facet (since I needed some $ totals anyways) which supports it correctly and now mixed it up. It is not working in 0.20.5

It would be very nice to make terms and terms_stats consistent in two ways

  1. terms to support size=0
  2. terms_stats to support totals/counts for "missing" and "other"

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

No branches or pull requests

3 participants