You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Stein Gran <st...@softwaredynamics.no> on 2013/06/05 20:25:45 UTC
Re: Pivot Facets refining datetime, bleh
This may be more suitable on the dev-list, but distributed pivot facets is
a very powerful feature. The Jira issue for this is SOLR-2894 (
https://issues.apache.org/jira/browse/SOLR-2894). I have done some testing
of the last patch for this issue, and it is as Andrew says: Everything but
datetime fields works just fine. There are no error messages for datetime
fields when used in a SolrCloud setup, the expected values are just not
there.
Best,
Stein J. Gran
On Thu, May 30, 2013 at 5:49 PM, Andrew Muldowney <
andrew.muldowney87@gmail.com> wrote:
> 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.
>