Search in sources :

Example 11 with Occurrences

use of org.exist.util.Occurrences in project exist by eXist-db.

the class LuceneIndexWorker method addOccurrence.

private void addOccurrence(TreeMap<String, Occurrences> map, String term, int frequency, DocumentImpl storedDocument) throws IOException {
    Occurrences oc = map.get(term);
    if (oc == null) {
        oc = new Occurrences(term);
        map.put(term, oc);
    }
    oc.addDocument(storedDocument);
    oc.addOccurrences(frequency);
}
Also used : Occurrences(org.exist.util.Occurrences)

Aggregations

Occurrences (org.exist.util.Occurrences)11 QName (org.exist.dom.QName)5 DocumentSet (org.exist.dom.persistent.DocumentSet)4 HashMap (java.util.HashMap)3 NodeSet (org.exist.dom.persistent.NodeSet)3 IndexWorker (org.exist.indexing.IndexWorker)3 OrderedValuesIndex (org.exist.indexing.OrderedValuesIndex)3 ValueOccurrences (org.exist.util.ValueOccurrences)3 DocumentImpl (org.exist.dom.persistent.DocumentImpl)2 Indexable (org.exist.storage.Indexable)2 XPathException (org.exist.xquery.XPathException)2 IntegerValue (org.exist.xquery.value.IntegerValue)2 Sequence (org.exist.xquery.value.Sequence)2 URISyntaxException (java.net.URISyntaxException)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 List (java.util.List)1 ReentrantLock (java.util.concurrent.locks.ReentrantLock)1 Stream (java.util.stream.Stream)1 Bits (org.apache.lucene.util.Bits)1