Skip to content

Search cross multiple index - #233

Open
Romer4ig wants to merge 1 commit into
Jeroen-G:masterfrom
Romer4ig:feature-multisearch
Open

Search cross multiple index#233
Romer4ig wants to merge 1 commit into
Jeroen-G:masterfrom
Romer4ig:feature-multisearch

Conversation

@Romer4ig

@Romer4ig Romer4ig commented Feb 28, 2024

Copy link
Copy Markdown

I see in old PR and found code. rewrite it to current state for use within() Scout function as example

MixedSearch::search()->within(implode(',', [
    (new Movie())->searchableAs(),
    (new Series())->searchableAs(),
    (new Trailer())->searchableAs(),
]))->get();

@Jeroen-G

Copy link
Copy Markdown
Owner

What does it do and how should I test it? 🤔

@Romer4ig

Romer4ig commented Mar 6, 2024

Copy link
Copy Markdown
Author

What does it do and how should I test it? 🤔
This functionality is inspired by the official Elasticsearch documentation available at https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multiple-indices.html.
Additionally, I found a similar example in another library at https://github.com/matchish/laravel-scout-elasticsearch?tab=readme-ov-file#search-amongst-multiple-models.
As I mentioned earlier, there was a request to implement such functionality in another pull request.
The expected test scenario involves creating two indices from two different models. The search operation should return corresponding entities from these two different tables.

@Jeroen-G Jeroen-G added postponed Needs more thinking and elaboration. help wanted labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted postponed Needs more thinking and elaboration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants