Hello! Hoping you will either accept or give feedback on this change! Thank you for your work on this plugin.
Context
At my organization, we want the Docs search in Backstage to be a fresh start. So we only want to index old confluence pages that we know are high quality. This plugin already supports filtering by space but this is not specific enough for our needs.
This change
This change supports an additional CQL query to be configured in app-config.yaml which will further limit the pages returned beyond what the user passes in for the spaces config option. This will allow us to tag the pages that we want indexed in backstage.
edge cases
I'm not sure there is a way of properly escaping input from config parameters to avoid injection of values causing the query to behave in unexpected ways (eg a quote in a space name). I don't think this is a problem since the query is being passed to the REST GET search endpoint so I don't imagine it could do much damage but I'm happy to hear feedback on that.
Testing
I didn't write any automated tests since I'm a node beginner and I didn't find existing tests to add to.
For manual testing, I tried the following:
spaces: ['~marguerite'], query not defined: ensured all pages in space were indexed
spaces: ['~marguerite', 'infra'], query not defined: ensured all pages in both spaces were indexed
spaces: ['~marguerite'], query: 'label = "stompy"': ensured only pages in ~marguerite space with label stompy were indexed
spaces: ['~marguerite', 'infra'], query: 'label = "stompy"': ensured only pages in either space with label stompy were indexed
Hello! Hoping you will either accept or give feedback on this change! Thank you for your work on this plugin.
Context
At my organization, we want the Docs search in Backstage to be a fresh start. So we only want to index old confluence pages that we know are high quality. This plugin already supports filtering by space but this is not specific enough for our needs.
This change
This change supports an additional CQL query to be configured in app-config.yaml which will further limit the pages returned beyond what the user passes in for the
spaces
config option. This will allow us to tag the pages that we want indexed in backstage.edge cases
I'm not sure there is a way of properly escaping input from config parameters to avoid injection of values causing the query to behave in unexpected ways (eg a quote in a space name). I don't think this is a problem since the query is being passed to the REST GET search endpoint so I don't imagine it could do much damage but I'm happy to hear feedback on that.
Testing
I didn't write any automated tests since I'm a node beginner and I didn't find existing tests to add to.
For manual testing, I tried the following:
spaces: ['~marguerite']
,query
not defined: ensured all pages in space were indexedspaces: ['~marguerite', 'infra']
,query
not defined: ensured all pages in both spaces were indexedspaces: ['~marguerite']
,query: 'label = "stompy"'
: ensured only pages in~marguerite
space with labelstompy
were indexedspaces: ['~marguerite', 'infra']
,query: 'label = "stompy"'
: ensured only pages in either space with label stompy were indexedIs there other testing you'd like me to do?