Search in sources :

Example 1 with TermFrequencyIndexIterator

use of datawave.query.iterator.logic.TermFrequencyIndexIterator in project datawave by NationalSecurityAgency.

the class TermFrequencyIndexBuilder method build.

@SuppressWarnings("unchecked")
public NestedIterator<Key> build() {
    if (notNull(field, range, source, datatypeFilter, timeFilter)) {
        IndexIteratorBridge itr = new IndexIteratorBridge(new TermFrequencyIndexIterator(range, source, this.timeFilter, this.typeMetadata, this.fieldsToAggregate == null ? false : this.fieldsToAggregate.contains(field), this.datatypeFilter, termFrequencyAggregator), getNode(), getField());
        field = null;
        range = null;
        source = null;
        timeFilter = null;
        datatypeFilter = null;
        node = null;
        return itr;
    } else {
        StringBuilder msg = new StringBuilder(256);
        msg.append("Cannot build iterator-- a field was null!\n");
        if (field == null) {
            msg.append("\tField was null!\n");
        }
        if (range == null) {
            msg.append("\tValue was null!\n");
        }
        if (source == null) {
            msg.append("\tSource was null!\n");
        }
        msg.setLength(msg.length() - 1);
        throw new IllegalStateException(msg.toString());
    }
}
Also used : TermFrequencyIndexIterator(datawave.query.iterator.logic.TermFrequencyIndexIterator) IndexIteratorBridge(datawave.query.iterator.logic.IndexIteratorBridge)

Aggregations

IndexIteratorBridge (datawave.query.iterator.logic.IndexIteratorBridge)1 TermFrequencyIndexIterator (datawave.query.iterator.logic.TermFrequencyIndexIterator)1