Search in sources :

Example 1 with Posting

use of com.yahoo.search.predicate.index.Posting in project vespa by vespa-engine.

the class PredicateIndexBuilder method indexDocumentConjunctions.

private void indexDocumentConjunctions(int docId, Map<IndexableFeatureConjunction, List<Integer>> featureConjunctions) {
    for (Map.Entry<IndexableFeatureConjunction, List<Integer>> e : featureConjunctions.entrySet()) {
        IndexableFeatureConjunction fc = e.getKey();
        List<Integer> intervals = e.getValue();
        Posting posting = new Posting(docId, intervalStoreBuilder.insert(intervals));
        conjunctionIntervalIndexBuilder.insert(fc.id, posting);
        conjunctionIndexBuilder.indexConjunction(fc);
    }
}
Also used : IndexableFeatureConjunction(com.yahoo.search.predicate.index.conjunction.IndexableFeatureConjunction) Posting(com.yahoo.search.predicate.index.Posting) ArrayList(java.util.ArrayList) List(java.util.List) Collectors.toList(java.util.stream.Collectors.toList) Map(java.util.Map) TreeMap(java.util.TreeMap)

Aggregations

Posting (com.yahoo.search.predicate.index.Posting)1 IndexableFeatureConjunction (com.yahoo.search.predicate.index.conjunction.IndexableFeatureConjunction)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 Collectors.toList (java.util.stream.Collectors.toList)1