Skip to content

Commit c540b21

Browse files
committed
optimize: remove intermediate variable in Meilisearch request
1 parent 9401362 commit c540b21

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/store/src/Bridge/Meilisearch/Store.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,8 @@ public function query(Vector $vector, array $options = []): array
8585
throw new InvalidArgumentException(\sprintf('The semantic ratio must be between 0.0 and 1.0, "%s" given.', $semanticRatio));
8686
}
8787

88-
$queryText = $options['q'] ?? '';
89-
9088
$result = $this->request('POST', \sprintf('indexes/%s/search', $this->indexName), [
91-
'q' => $queryText,
89+
'q' => $options['q'] ?? '',
9290
'vector' => $vector->getData(),
9391
'showRankingScore' => true,
9492
'retrieveVectors' => true,

0 commit comments

Comments
 (0)