You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The string "brand" and Category, really category->getCode() , are facets, and I want to search by facet for the exact brand and category, and only search name and description using the full-text search.
First question is how to index them, then how to search them. In another project that uses the meillisearch-php library and api-platform, I have an attribute that I use to indicate that it's a facet.
On a note related to #336 , I love PHP8 attributes, and rather than or in addition to adding a facets field to the meilisearch.yaml file, they could be tagged in the entity with an attribute pretty easily by scanning the entity classes during the CompilerPass.
Anyway, is facet indexing and searching possible with the current version of the bundle? The repo I used for testing the debug toolbar at https://github.com/survos-sites/stimulus-tutorial immediately ran into this issue.
// ProductController.php$searchTerm = $request->query->get('q');
if ($searchTerm) {
// @todo: set category as a facet and include it here.$products = $searchService->search($entityManager, Product::class, $searchTerm);
} else {
// with doctrine$products = $productRepository->search(
$category,
$searchTerm
);
}
The text was updated successfully, but these errors were encountered:
I looked at #274, but my question is more about how to index facets.
In my product class at https://github.com/survos-sites/stimulus-tutorial/blob/main/src/Entity/Product.php
The string "brand" and Category, really category->getCode() , are facets, and I want to search by facet for the exact brand and category, and only search name and description using the full-text search.
First question is how to index them, then how to search them. In another project that uses the meillisearch-php library and api-platform, I have an attribute that I use to indicate that it's a facet.
On a note related to #336 , I love PHP8 attributes, and rather than or in addition to adding a facets field to the meilisearch.yaml file, they could be tagged in the entity with an attribute pretty easily by scanning the entity classes during the CompilerPass.
Anyway, is facet indexing and searching possible with the current version of the bundle? The repo I used for testing the debug toolbar at https://github.com/survos-sites/stimulus-tutorial immediately ran into this issue.
The text was updated successfully, but these errors were encountered: