Bad info on numeric facets

Apr 9, 2012 at 2:45 AM

Hi!

I'm getting rare information on my Numeric facets.

Example: In my database i have recordsg grouped by a column. This are the records:

'Col A' Count
1 502
2 36
3 2216
4 806
5 172
6 17
7 6

So, my facet should return that values but returns this

1 (3755)
1 (3755)
1 (3755)
1 (3755)
1 (3755)
3 (2216)
4 (806)
1 (502)
5 (195)
5 (172)
2 (36)
6 (17)
7 (6)

The first record (with 3755) are the sum of the others (2216+806+502+195+172+36+17+6).

¿This is an error or I change my code?

  1 - This is how I generating my index:

Document document = new Document();
NumericField field;

field = new NumericField("Ambientes", 2, Field.Store.YES, true);
document.Add(field.SetIntValue(reader.GetInt32(16)));
2 - This is how I add my facet
List<FacetHandler> facetHandler = new List<FacetHandler>();
FacetHandler facetHandlerItem = new MultiValueFacetHandler("XXX");
facetHandler.Add(facetHandlerItem);
FacetSpec spec = new FacetSpec();
spec.MinHitCount = 1;
spec.OrderBy = FacetSpec.FacetSortSpec.OrderHitsD.SetFacetSpec(nombreFaceta, spec);
ICollection<FacetHandler> handlerList = facetHandler;

If instead of this, I use facetHandlerItem = new SimpleFacetHandler(nombreFaceta, new PredefinedTermListFactory<int>());
I only get one item instead of the seven items.

 

Thanks!

Coordinator
Apr 9, 2012 at 8:33 AM

Not sure why it is not working properly. Could you attach a minimized sample app with sources? I would like to debug it locally on my machine.