Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate array keys in TypesenseEngine::buildSearchParams #85

Open
olexin-pro opened this issue Jan 20, 2024 · 1 comment
Open

Duplicate array keys in TypesenseEngine::buildSearchParams #85

olexin-pro opened this issue Jan 20, 2024 · 1 comment

Comments

@olexin-pro
Copy link

olexin-pro commented Jan 20, 2024

Description

Keys are repeated: q, query_by, filter_by, per_page, page, highlight_start_tag, highlight_end_tag, exhaustive_search
in TypesenseEngine::buildSearchParams on line 230

    private function buildSearchParams(Builder $builder, int $page, int|null $perPage): array
    {
        $params = [
            'q' => $builder->query,
            'query_by' => implode(',', $builder->model->typesenseQueryBy()),
            'filter_by' => $this->filters($builder),
            'per_page' => $perPage,
            'page' => $page,
            'highlight_start_tag' => $this->startTag,
            'highlight_end_tag' => $this->endTag,
            'exhaustive_search' => $this->exhaustiveSearch,
            'q'                          => $builder->query,
            'query_by'                   => implode(',', $builder->model->typesenseQueryBy()),
            'filter_by'                  => $this->filters($builder),
            'per_page'                   => $perPage,
            'page'                       => $page,
            'highlight_start_tag'        => $this->startTag,
            'highlight_end_tag'          => $this->endTag,
            'snippet_threshold'          => $this->snippetThreshold,
            'exhaustive_search'          => $this->exhaustiveSearch,
            'use_cache'                  => $this->useCache,
            'cache_ttl'                  => $this->cacheTtl,
            'prioritize_exact_match'     => $this->prioritizeExactMatch,
            'enable_overrides'           => $this->enableOverrides,
            'highlight_affix_num_tokens' => $this->highlightAffixNumTokens,
        ];

       // etc...

}

Metadata

Typesense Version:0.25.2
laravel-scout-typesense-driver: 5.2.8

OS: Docker

@olexin-pro olexin-pro changed the title Duplicate keys in TypesenseEngine::buildSearchParams Duplicate array keys in TypesenseEngine::buildSearchParams Jan 20, 2024
@aou24
Copy link

aou24 commented Apr 18, 2024

already fixed in #74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants