You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Brett Lucey <bl...@gmail.com> on 2014/03/04 16:40:47 UTC

Distributed Pivot Facet Consistency

We have been trying to finish up the distributed pivot facet patch to
submit it for committing, but we've run into one issue raised in the JIRA
issue for the patch.

Distributed field facets appear to convert all values to strings, and
refine on those strings when needed.  The solrj test cases around the
distributed field facets also expect all values to be represented as
strings.  Please correct me if I'm wrong.

The most recent revision of the patch for SOLR-2894 converts all values to
strings as well, except in the case of booleans.  If we don't have this
exception, the solrj test case of distributed pivot facets will fail
because there is an assert verifying that the value returned is
Boolean.TRUE rather than "true".  If we do not convert object values to
strings, we are unable to refine on date time's because the format will be
incorrect and the date time class is unable to convert it back.

Our feeling is that this assert is incorrect and that it should be looking
for the string true.  Changing this test case would allow us to bring the
behavior of distributed pivot facets into consistency with the behavior of
distributed field facets.  We didn't want to just go ahead and make that
change because it would change the behavior of solrj.

It appears our options are:
1.  Convert all values to strings.  Modify the solrj test case to expect
this.  We feel this makes things consistent and is the ideal option.
2.  Convert all values exception booleans to strings.
3.  Leave all values except datettimes as is.

We are just looking for some input from the community prior to adding this
change to our patch.

Thanks,
-Brett