$stems Stems to look up. * * @return array Stem -> document-count map. Stems with no * row are absent, not mapped to zero. */ public function get_many( array $stems ): array; /** * Returns the corpus document count. * * @since 1.10.0 * * @return int Zero when the map has not been built yet. */ public function get_document_count(): int; /** * Applies incremental +1/-1 adjustments for one indexed post's stems. * * @since 1.10.0 * * @param array $stem_deltas Stem -> net delta map. * @param int $doc_delta Corpus document-count delta. * * @return bool False when a write failed. */ public function apply_delta( array $stem_deltas, int $doc_delta ): bool; /** * Replaces the entire stored frequency map (full rebuild). * * @since 1.10.0 * * @param array $stem_counts Complete stem -> document-count map. * @param int $doc_count Complete corpus document count. * * @return bool False when a write failed. */ public function replace_all( array $stem_counts, int $doc_count ): bool; }