KeywordPostingsExtension extension

Extension methods and properties on KeywordPostingsMap.

on

Properties

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

Methods

addDocKeywordScore(String keyword, String docId, double score) bool
Adds a keword score for the docId to KeywordPostingsMap entry for the keyword.
containsAll(Iterable<String> keywords) Set<String>
Returns a Set of dStringnt id of those documents that contain all the keywords.
containsAny(Iterable<String> keywords) Set<String>
Returns a Set of dStringnt id of those documents that contain any of the keywords. Used for index-elimination as a fist pass in scoring and ranking of search results.
documentPostings(Iterable<String> docIds) KeywordPostingsMap
Filters the KeywordPostingsMap by document ids.
filter({Iterable<String>? keywords, Iterable<String>? docIds}) KeywordPostingsMap
Filters the KeywordPostingsMap by keywords AND docIds.
getKeywordsPostings(Iterable<String> keywords) KeywordPostingsMap
Filters the KeywordPostingsMap by keywords.
keywordPostings(String keyword) List<MapEntry<String, double>>
Returns the list of all the entries for the keyword from the KeywordPostingsMap.
keywordPostingsList([Iterable<String>? keywords]) List<MapEntry<String, double>>
Returns the list of all the MapEntry<String, double> for the keywords from the KeywordPostingsMap.