Candidates excluding the source itself. */ public function get_candidates_for( PostModel $source ): array; /** * Returns every candidate's identity and title, without content. * * Phase 1 of two-phase loading: cheap enough to run over the whole * corpus, because it never reads or tokenises `post_content`. The * engine gates on these (title overlap and target-keyword matching * need nothing more), then asks {@see hydrate()} for the survivors. * * @since 1.10.0 * * @param PostModel $source The post or term being analysed. * * @return array Light candidates excluding the * source itself. */ public function get_light_candidates_for( PostModel $source ): array; /** * Returns fully-tokenised candidates for the given post ids. * * Phase 2 of two-phase loading: this is where `post_content` is read * and stemmed, so callers must only ever pass ids that already * survived the engine's gate — never the whole corpus, or the cost * this split exists to avoid is paid anyway. * * A post id with no meaningful words (empty title and content) is * omitted from the result, matching {@see get_candidates_for()}'s * long-standing "not a candidate at all" rule — callers must not * assume every requested id comes back. * * @since 1.10.0 * * @param array $post_ids Post ids to hydrate. Passing an * empty array must return an empty * array without querying anything. * * @return array Fully-tokenised candidates, in no * guaranteed order, and possibly fewer * than the ids requested. */ public function hydrate( array $post_ids ): array; }