using TYPE.setDocValuesType(DocValuesType.SORTED);
 it works.

I didnt undestand the reasons. Maybe for for fast grouping is necessary
maybe to sorting , so algo can find distinct groups

2016-08-18 17:40 GMT+02:00 Cristian Lorenzetto <
cristian.lorenze...@gmail.com>:

> in my old code
>
> i created public class BinDocValuesField extends Field {
>
> /**
> * Type for numeric DocValues.
> */
> public static final FieldType TYPE = new FieldType();
>
> static {
>
> TYPE.setTokenized(false);
> TYPE.setOmitNorms(true);
> TYPE.setIndexOptions(IndexOptions.DOCS);
> TYPE.setStored(true);
>
> TYPE.setDocValuesType(DocValuesType.BINARY);
> TYPE.freeze();
> }
>
> public BinDocValuesField(String name, byte[] value) {
> super(name, TYPE);
> fieldsData = new BytesRef(value);
> }
>
> }
>
> and in test code i created 4 documents adding BinDocValuesField fields
> where 2 docs has same binary and other 2 the same binary.
>
> executing TopGroups<?> tg = search.search(searcher, query, groupIndex,
>  LIMIT );
>
> now i have 4 groups instead of 2 groups.
> tg.totalGroupCount is correctly 2.
>
> any idea what can be changed?
>
>
>
>
>
>

Reply via email to