Replies: 1 comment 2 replies
-
@ToshY First I really want to thank you for giving SEAL a try and give here feedback. I try to answer all your questions.
Symfony Flex normally should automatically find the Bundle class and register it. Still we could improve the installation process for Symfony users providing a symfony recipe. I created an issue for this, recipes need to be contributed to the symfony recipes repository. The issue on our side can be found here: #316, if you contribute this let me know in the linked issue.
This two are planned to be supported but currently I first need todo a research how to achieve it correctly in the different search engines. But it sure something which will come in one of the future versions of SEAL. Please feel free to upvote: #317
I did not yet think about this one as not in all search engines something like Feel free to add your thoughts to: #318 and upvote it.
This is something I want not to add at current state but want to add in future maybe. At current state I'm required to get great feedback like this to know where the limits of SEAL are and what people expect from a search library. Adding things like RawFilterCondition people would always workaround at current state via it and I would not really get feedback about what is missing in the current library.
I'm not planning to add a I Hope I could answer all your questions. Best Regards, |
Beta Was this translation helpful? Give feedback.
-
Hey @alexander-schranz 👋
Just came across this library and after a quick look at the docs, this library looks like you've spend a good amount of time and effort in creating it 👏 Seems to fit a lot of (my) various needs, so I immediatly wanted to try it out.
Now what I first noticed from the install is that I came across just one minor hickup. After following the Installation guide and installing the packages
schranz-search/symfony-bundle
andschranz-search/seal-meilisearch-adapter
, I noticed it did not automatically add theSearchBundle
toconfig/bundles.php
.config/bundles.php
This is not a big deal, and I'm not sure if it's something I messed up during the install, but it's something I wanted to point out 🙂
Overall, setting up the config, creating a schema with provider, and also running the (re)indexing commands really work great! Also, the documentation is easy to follow with a lot of examples, which I really appreciate 👍
So after the indexing I tried to rewrite some of my "raw" filters to the new
Condition
s, and at a certain point I stumbled across an issue: I'm usingOR
operators in my filters, but where's theOrCondition
🤔An example (raw) filter which I'm currently using is as follows:
For me, this raises several questions:
OrCondition
, so how should I approach this?IS NULL
, how would use this if none of theCondition
s allow for typenull
to be passed as value?In pseudo-code I would imagine having nested conditions like this to rewrite the raw filter above:
As you can see I'd like to have some extra conditions like
AndCondition
,OrCondition
,IsNullCondition
, etc. And while I thought that doesn't sound like a bad idea, I honestly don't know what kind of impact that would have to add those. So with that said, I thought of a simpler idea: something like aRawFilterCondition
, which allows (like the name suggests) the raw filter you want to add.Schranz\Search\SEAL\Search\Condition\RawFilterCondition
Schranz\Search\SEAL\Adapter\Meilisearch\MeilisearchSearcher
I then should be able to do something like this:
Another thing I'm actually looking for (is something I was also missing in the Meilisearch bundle itself) is the possiblity to freely add and remove filters.
The use case is as follows:
SearchBuilder
that takes this into account by creating an instance which which always performs anaddFilter(...)
call for the index I'm going to search the content for.SearchBuilder
the filter is always applied by default. Great, exactly what I was looking for, as I now don't have to addaddFilter
every time I'm going to use it in my services.SearchBuilder
but I explicitely want this filter removed now.I've been thinking on how to approach this, and while I could create different
SearchBuilder
instances for the same index, one with and one without having the filter added by default, that doesn't really seem efficient in more complex cases when there's a need for multiple default filters to be added.So my initial idea was to add a
removeFilter
method (maybe even aremoveSortBy
while we're at it) to theSearchBuilder
.Schranz\Search\SEAL\Search\SearchBuilder
I then should be able to do something like this:
To me this seems like a very small addition which allows for a lot more flexibility.
Let me know what you think of it, If the above suggestions don't sound too far-fetched, I'm willing to create feature requests with corresponding PRs for it 🙂 If you think it may be better to leave out of the schranz-search that's fine too; I will extend the existing searchers with my own logic then 👌
Beta Was this translation helpful? Give feedback.
All reactions