-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add the possibility to search by ContentId or LocationId in the searc… #70
base: master
Are you sure you want to change the base?
Conversation
…h tab of the browse feature in Universal Discovery Module
This is interesting, could build upon this kind of things with more expressions ala what was added to fulltext. /cc @SylvainGuittard |
Thanks @NonoKaliop for the contribution. I think it's a interesting idea. Side question: does it make sense to also add remoteID? I don't have a use case, just asking. |
It's should at least be possible to add it. Two people that might have interesting things to add here is:
|
@andrerom Query Translator would fit well here, you can cover these cases using the domain feature. And you can also customize the syntax and implement a generator that would convert AST to search criteria. Implementing a language supporting basic subset of search API has been on my to do list for some time now. |
So maybe Query translator on top of @bdunogier's https://github.com/ezsystems/QueryBuilderBundle or something like it could be a possible approach then to expose a EZQL in search interfaces* :) * And later allow those searches to be saved and used for views and filters across the system ✨ |
Well, depends :) Query Translator would be perfect for handling user input, but handling some more complex criteria like Field or MapLocationDistance could be a bit awkward. On the other hand if you want to have a text field for input, you probably also don't care for supporting stuff like that anyway. But if you want to have some kind of query builder UI you might also want to go for a different language, one that would be formal and strict. It should not be too hard to implement since you would not need to worry about handling errors and Query is basically already an AST. So something that would more or less translate directly from the Query, like:
That is still readable, but I think not too friendly for user input. |
Good input! 😃 Maybe there is enough initial info here to get PM team to aim to specify something soon on this, sounds like a plan @SylvainGuittard ? |
Happy to see that we are making some progress here. I will sync with @bdunogier for some specifications. |
@SylvainGuittard @andrerom @bdunogier what is the status here? |
Add the possibility to search by ContentId or LocationId in the search tab of the browse feature in Universal Discovery Module.
In the UDM, we have the need to find content directly by contentId or locationId. With a lot of contents, browsing is often not an option and search results are sometimes a bit weird. It becomes difficult to find the content we look for.
This PR improves the ViewInput filter by reading the search query and searching something like "content:123" or "location:456". If such a pattern is found, replace the current FullTextCriterion with a LocationIdCriterion or ContentIdCriterion. Else keep the FullTextCriterion