Skip to content

Commit

Permalink
add hit_count to doclist db index
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackbitDevs committed Sep 3, 2024
1 parent a763e66 commit 7c5fe64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Engines/MysqlEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function createIndex($indexName)
( 'tokenizer', 'TeamTNT\TNTSearch\Support\Tokenizer')"
);

$this->index->exec("ALTER TABLE ".$this->indexName."_doclist ADD INDEX idx_term_id (`term_id`);");
$this->index->exec("ALTER TABLE ".$this->indexName."_doclist ADD INDEX idx_term_id_hit_count (`term_id`, `hit_count`);");
$this->index->exec("ALTER TABLE ".$this->indexName."_doclist ADD INDEX idx_doc_id (`doc_id`);");

if (isset($this->config['stemmer'])) {
Expand Down

0 comments on commit 7c5fe64

Please sign in to comment.