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

[api-grid] #31

Open
tacman opened this issue Feb 13, 2024 · 0 comments
Open

[api-grid] #31

tacman opened this issue Feb 13, 2024 · 0 comments

Comments

@tacman
Copy link
Collaborator

tacman commented Feb 13, 2024

We need prefixes to avoid conflicts with common Entity names, e.g. Project and Article.

In .env, add MEILI_PREFIX=gg_ to the GlobalGiving project.

indexing works as expected

in/console grid:index App\\Entity\\Project

gg_Project
==========

20 App\Entity\Project
=====================

 20/20 [============================] 100% < 1 sec/< 1 sec 34.5 MiB -- Indexing App\Entity\Project

                                                                                                                        
 [OK] gg_Project Document count:20                

But the search fails, because it's not taking the _indexName into account.

Delete the Project index if it exists, make sure MeiliSearch locally has no password/api key.

curl  -X DELETE http://127.0.0.1:7700/indexes/Project

https://gg.wip/browse/projects

Look at the http client debugger, and open the profiler, e.g. https://gg.wip/_profiler/7dc623

Even though the url has _index=gg_Project, the index being used is still Project.

image

In MeiliService, there is a method getPrefixedIndexName() that prepends the prefix, it's not being called and should be.

Passing of the indexName has become very messy, it's likely because of issues with the default value.

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

1 participant