fix(search-backend-module-confluence-collator): refine CQL query generation for spaces and query
Hey, I just made a Pull Request!
Fixes #4016
Previously, the Confluence collator would generate an invalid CQL query of the form () and (label="test") if the spaces
configuration was empty or not provided, but a query was specified. This resulted in no search results.
This commit refines the CQL query generation logic to correctly handle different combinations of spaces and query parameters:
- If only
spacesare provided, the query will bespace=S1 or space=S2. - If only
queryis provided, the query will beyour_query_here. - If both
spacesandqueryare provided, they will be combined as(space="S1" or space="S2") and (your_query_here). - If neither is provided, the default query to fetch all content types (
type IN (page, blogpost, comment, attachment)) is used.
Additionally, new test cases have been added to cover these scenarios, and the plugin documentation has been updated to clarify the behavior of these parameters.
:heavy_check_mark: Checklist
Changed Packages
| Package Name | Package Path | Changeset Bump | Current Version |
|---|---|---|---|
| @backstage-community/plugin-search-backend-module-confluence-collator | workspaces/confluence/plugins/search-backend-module-confluence-collator | patch | v0.10.0 |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!
Hey @vinzscam or @fjudith,
could you have a look at this pr? It's only a small fix, but it would help us start using the plugin.
@vinzscam friendly reminder.
@vinzscam I had to rebase. Could you please approve again and merge it?
@vinzscam the Github workflow seems to be stuck. Any idea on how to resolve the issue ?
@vinzscam friendly Reminder
Can you help out here, @fjudith? I don't understand what still needs to be done.
I guess @vinzscam needs to approve the last pending workflow and then merge it?
Hello @awanlin and @vinzscam !
Could you please help us int getting this PR merged ?
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!
Not stale, we're so close ... @vinzscam @awanlin
@stanley-nicholl thanks for the approval. What needs to be done to get it merged?
@dfl-aeb, just needs an official maintainer approval. Should be merged by today or tomorrow. Thanks for doing this!!