dadoonet  
                (David Pilato)
               
                 
              
                  
                    June 14, 2011, 12:02pm
                   
                   
              1 
               
             
            
              Hi,
While I was creating a test case for this thread : http://elasticsearch-users.115913.n3.nabble.com/Terms-facet-getting-all-the-results-tp3051086p3055360.html , I saw something that looks wrong (or I didn't understood how terms facet works).
Here is a Gist : https://gist.github.com/1024756 
My facet should return something like : 
"facets" : { 
"f_tags" : { 
"_type" : "terms", 
"missing" : 0, 
"terms" : [ { 
"term" : "seven", 
"count" : 7 
}, { 
"term" : "six", 
"count" : 6 
}, { 
"term" : "five", 
"count" : 5 
}, { 
"term" : "four", 
"count" : 4 
}, { 
"term" : "three", 
"count" : 3 
} ] 
}
But, I got this : 
"facets" : { 
"f_tags" : { 
"_type" : "terms", 
"missing" : 0, 
"terms" : [ { 
"term" : "seven", 
"count" : 7 
}, { 
"term" : "six", 
"count" : 6 
}, { 
"term" : "three", 
"count" : 3 
}, { 
"term" : "four", 
"count" : 3 
}, { 
"term" : "five", 
"count" : 3 
} ] 
}
As you can see, the 3 last terms seems to be wrong...
Am I doing something wrong ?
Thanks for any help 
David.
             
            
               
               
               
            
            
           
          
            
              
                kimchy  
                (Shay Banon)
               
              
                  
                    June 14, 2011,  3:53pm
                   
                   
              2 
               
             
            
              I am getting the correct counts with the gist you provided. Are you executing it as a single script? Maybe the last bits are not refreshed yet? Or maybe are you specifying in your test a different size for the facets?
On Tuesday, June 14, 2011 at 3:02 PM, David Pilato wrote:
Hi,
While I was creating a test case for this thread : http://elasticsearch-users.115913.n3.nabble.com/Terms-facet-getting-all-the-results-tp3051086p3055360.html , I saw something that looks wrong (or I didn't understood how terms facet works).
Here is a Gist : ES Terms Facet send back bad count results · GitHub 
My facet should return something like : 
"facets" : { 
"f_tags" : { 
"_type" : "terms", 
"missing" : 0, 
"terms" : [ { 
"term" : "seven", 
"count" : 7 
}, { 
"term" : "six", 
"count" : 6 
}, { 
"term" : "five", 
"count" : 5 
}, { 
"term" : "four", 
"count" : 4 
}, { 
"term" : "three", 
"count" : 3 
} ] 
}
But, I got this : 
"facets" : { 
"f_tags" : { 
"_type" : "terms", 
"missing" : 0, 
"terms" : [ { 
"term" : "seven", 
"count" : 7 
}, { 
"term" : "six", 
"count" : 6 
}, { 
"term" : "three", 
"count" : 3 
}, { 
"term" : "four", 
"count" : 3 
}, { 
"term" : "five", 
"count" : 3 
} ] 
}
As you can see, the 3 last terms seems to be wrong...
Am I doing something wrong ?
Thanks for any help 
David.
 
             
            
               
               
               
            
            
           
          
            
              
                kimchy  
                (Shay Banon)
               
              
                  
                    June 14, 2011,  3:55pm
                   
                   
              3 
               
             
            
              Sorry, I now see in the response that it did "see" 7 docs, so, its strange. Is the gist exactly what you are executing?
On Tuesday, June 14, 2011 at 6:53 PM, Shay Banon wrote:
I am getting the correct counts with the gist you provided. Are you executing it as a single script? Maybe the last bits are not refreshed yet? Or maybe are you specifying in your test a different size for the facets?
On Tuesday, June 14, 2011 at 3:02 PM, David Pilato wrote:
Hi,
While I was creating a test case for this thread : http://elasticsearch-users.115913.n3.nabble.com/Terms-facet-getting-all-the-results-tp3051086p3055360.html , I saw something that looks wrong (or I didn't understood how terms facet works).
Here is a Gist : ES Terms Facet send back bad count results · GitHub 
My facet should return something like : 
"facets" : { 
"f_tags" : { 
"_type" : "terms", 
"missing" : 0, 
"terms" : [ { 
"term" : "seven", 
"count" : 7 
}, { 
"term" : "six", 
"count" : 6 
}, { 
"term" : "five", 
"count" : 5 
}, { 
"term" : "four", 
"count" : 4 
}, { 
"term" : "three", 
"count" : 3 
} ] 
}
But, I got this : 
"facets" : { 
"f_tags" : { 
"_type" : "terms", 
"missing" : 0, 
"terms" : [ { 
"term" : "seven", 
"count" : 7 
}, { 
"term" : "six", 
"count" : 6 
}, { 
"term" : "three", 
"count" : 3 
}, { 
"term" : "four", 
"count" : 3 
}, { 
"term" : "five", 
"count" : 3 
} ] 
}
As you can see, the 3 last terms seems to be wrong...
Am I doing something wrong ?
Thanks for any help 
David.
 
 
             
            
               
               
               
            
            
           
          
            
            
              On Tue, 2011-06-14 at 18:55 +0300, Shay Banon wrote:
Sorry, I now see in the response that it did "see" 7 docs, so, its 
strange. Is the gist exactly what you are executing?
 
I tried the same gist on 0.16.2 and got the correct counts, but then 
also had missing: 7
clint
             
            
               
               
               
            
            
           
          
            
              
                dpilato  
                (dpilato)
               
              
                  
                    June 15, 2011,  1:05pm
                   
                   
              5 
               
             
            
              My bad !
I don't know why but after deleting the index curl -X DELETE "http://localhost:9200/articles " 
and then creating articles, everything is now correct.
Sorry to have raised a fake bug !
Thanks for having take time looking at it. 
Cheers