I've been trying to get into how distributed field facets do their work but I haven't been able to uncover how they deal with this issue.
Currently distrib pivot facets does a getTermCounts(first_field) to populate a list at the level its working on. When putting together the data structure we set up a BytesRef, fill it in with the value using the FieldType.ReadableToIndexed call and then add the FieldType.ToObject of that bytesRef and associated field. --From getTermCounts comes fieldValue-- termval = new BytesRef(); ftype.readableToIndexed(fieldValue, termval); pivot.add( "value", ftype.toObject(sfield, termval) ); This works great for everything but datetime, as datetime's .ToObject turns it into a human readable string that is unconvertable -at least in my investigation. I've tried to use the FieldType.ToInternal but that also fails on the human readable datetime format. My original idea was to skip the aformentioned block of code and just straight add the fieldValue to the data structure. This caused some pivot facet tests to return wonky results, I'm not sure if I should go down the path of trying to figure out those problems or if there is a different approach I should be taking. Any general guidance on how distributed field facets deals with this would be much appreciated.