On Thu, Jan 14, 2016 at 2:43 PM, Lewin Joy (TMS) <lewin....@toyota.com> wrote: > Thanks for the reply. > But, the grouping on multivalued is working for me even with multiple data in > the multivalued field. > I also tested this on the tutorial collection from the later solr version > 5.3.1 , which works as well.
Older versions of Solr would happily populate a FieldCache entry with a multi-valued field by overwriting old values with new values while uninverting. Thus the FieldCache entry (used for sorting, faceting, grouping, function queries, etc) would contain just the last/highest value for any document. So that sort-of explains how it was working in the past I think... probably not how you intended. If it works sometimes, but not other times, it may be due to details of the request that cause one code path to be executed vs another, and you hit a path were the check is done vs not. The check checks the schema only. For example, in StrField.java: @Override public ValueSource getValueSource(SchemaField field, QParser parser) { field.checkFieldCacheSource(parser); return new StrFieldSource(field.getName()); } There are different implementations of grouping... and only some go through a ValueSource I believe... and those are the only ones that would check to see if the field was single valued. The grouping code started in Solr, but was refactored and moved to Lucene, and I'm no longer that familiar with it. -Yonik