Allowing different entities indexed into same index #92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While this PR got out of control 😄 and poses a bigger rewrite of the tests, it addresses multiple issues.
Passing index names via command line
Passing index name via command line now takes care if the name of the is already prefixed or not. Running
bin/console meili:import --indices=prefix_indexName
bin/console meili:import --indices=indexName
leads to the same index creations which is
prefix_indexName
- given theprefix
hold a value.Indexing different models into the same index
See #90
Although MS supports importing different models into the same index, this was not easiliy possible using this package.
The configuration in
meili_search.yml
would not allowe to set the same index name twice.Now you can do the following
This would lead to the result of having models of
Tag
andLink
inside the very same indextags
.id
, the value of this needs to be unique across both models.@curquiza When the PR is approved and merged this should be documented inside a the wiki.
Using aggregators
See #90
You can now create an aggregator, register your models and will get an aggregated index created in MS. As the identity field of each model is used as identity field in the aggregated index...
@curquiza When the PR is approved and merged this should be documented inside a the wiki.
Fixing inconsistency
See #89
Fixes some left of overs from refatoring
indexName
-> ìndexUid`. #89 is outdated with this PR here.Further changes
tests/blog.sqlite
. Just use thevar/test.sqlite
folder which already holds cached/runtime data.setUp
method. No need to have a dedicatedrefreshDb
andclearUp
call spread across the test. Each test should be atomic and not relying on former data. So 🗑️ everything 😃phpunit.xml
to the more recent format using the--migrate-configuration
option.Collection
object, seeilluminate/collection
. Makes it a lot easier to deal with, if you ask me 🙈