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

feat: Adds hybrid search options contract for multisearch #670

Closed
wants to merge 3 commits into from

Conversation

apozeus
Copy link
Contributor

@apozeus apozeus commented Aug 29, 2024

Pull Request

Related issue

Adds hybrid search options contract for multisearch

What does this PR do?

  • ...

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

src/Contracts/HybridSearchOptions.php Show resolved Hide resolved
src/Contracts/SearchQuery.php Outdated Show resolved Hide resolved

declare(strict_types=1);

namespace MeiliSearch\Contracts;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
namespace MeiliSearch\Contracts;
namespace Meilisearch\Contracts;

class HybridSearchOptions
{
private ?float $semanticRatio = null;
private ?string $embedder = null;
Copy link
Collaborator

@norkunas norkunas Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private ?string $embedder = null;
/**
* @var non-empty-string|null
*/
private ?string $embedder = null;


return $this;
}

Copy link
Collaborator

@norkunas norkunas Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* @return array{
* semanticRatio?: float,
* embedder?: non-empty-string
* }
*/

@@ -27,6 +27,7 @@ class SearchQuery
private ?int $hitsPerPage;
private ?int $page;
private ?array $vector;
private ?HybridSearchOptions $hybrid;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private ?HybridSearchOptions $hybrid;
private ?HybridSearchOptions $hybrid = null;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was testing it now too. and have made a similar commit. please check.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've commited it to another PR. so please choose one and close another one.

@apozeus apozeus closed this Sep 10, 2024
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

Successfully merging this pull request may close these issues.

2 participants