@Override public BytesRefHash getCollectedTerms() { return collector.getCollectorTerms(); }
@Override public LeafCollector getLeafCollector(LeafReaderContext context) throws IOException { return collector.getLeafCollector(context); }
@Override public boolean needsScores() { return collector.needsScores(); }
/** * Chooses the right {@link TermsCollector} implementation. * * @param field The field to collect terms for * @param multipleValuesPerDocument Whether the field to collect terms for has multiple values per document. * @return a {@link TermsCollector} instance */ static TermsCollector<?> create(String field, boolean multipleValuesPerDocument) { return multipleValuesPerDocument ? new MV(sortedSetDocValues(field)) : new SV(binaryDocValues(field)); }