PostingsExtension extension

Extension methods and properties on PostingsMap.

on

Properties

docIds Set<String>
Returns all the unique document ids (document id) in the PostingsMap.
no setter
terms List<String>
Returns the dictionary terms (keys) as an ordered list, sorted alphabetically.
no setter

Methods

addTermPosition({required String term, required String docId, required Pt position, String? zone}) bool
Adds or updates a posting position for the docId to PostingsMap entry for the term.
addZonePostings(String term, String docId, ZonePostingsMap positions) bool
Adds a postings for the docId to PostingsMap entry for the term.
containsAll(Iterable<String> terms) Set<String>
Returns a Set of document id of those documents that contain all the terms.
containsAny(Iterable<String> terms) Set<String>
Returns a Set of document id of those documents that contain any of the terms. Used for index-elimination as a fist pass in scoring and ranking of search results.
documentPostings(Iterable<String> docIds) PostingsMap
Filters the PostingsMap by document ids.
fieldPostings(Iterable<String> fields) PostingsMap
Filters the PostingsMap by zone names.
filter({Iterable<String>? terms, Iterable<String>? docIds, Iterable<String>? fields}) PostingsMap
Filters the PostingsMap by terms, docIds AND fields.
getPostings(Iterable<String> terms) PostingsMap
Filters the PostingsMap by terms.
termPostings(String term) List<DocPostingsMapEntry>
Returns the list of all the DocPostingsMapEntry for the term from the PostingsMap.
termPostingsList([Iterable<String>? terms]) List<DocPostingsMapEntry>
Returns the list of all the DocPostingsMapEntry for the terms from the PostingsMap.
toList() List<PostingsMapEntry>
Returns the list of PostingsMapEntry elements in the PostingsMap in alphapetic order of the terms (keys).