CQL-based result filtering
Dear Sir or Madam,
would you consider adding a mechanism to filter search results based on a CQL-query? In our view, this would greatly enhance the possibilities and use-cases with this plugin!
Kind regards
Sven Alebrand
Comments (19)
-
repo owner -
reporter Hey Nathan,
Thanks for the prompt reply!
I am trying to offer a search field where only content with a certain metadataset (a set from the „Metadata for Confluence“-app by Communardo) is found. More precisely: I want to offer a full-text search on page contents, but only pages that contain the search term and a certain fixed metadataset shall be returned. „Metadata for Confluence“ supports CQL-queries, see https://communardo.atlassian.net/wiki/spaces/METADATA/pages/27203065/Searching+with+Metadata+v+3.3
As an example: I‘d like to search for „My text“ in all confluence pages that match the CQL „metadataset=global.metadataset.mymetadataset“.
Does that help you understand my use-case?
Sven
-
repo owner I think I understand. Are you primarily targeting cloud or data center?
Also, are you only matching a single set of metadata?
-
reporter I am solely targeting data center.
No, I am not necessarily matching a single set of metadata. Compound CQL-expressions may be necessary, too. E.g.:
metadataset=global.metadataset.mymetadataset AND global.metadatafield.mytestfield="mytestvalue"
-
repo owner Okay. Let me do some digging in order for me to make sure that this will be possible with the data center version.
-
reporter Greatly appreciated!
-
repo owner (1) Are you able get you query to work for you if you extend the CQL metadata query to the query string?
i.e., currently I do:
e.g., my current query string is:
((query*) OR (query))
there are a few other parameters that get handed to the server.
If you add your CQL to the site search parameter box, do you get the desired results?
e.g.,
((quer*) OR (quer)) and metadataset=global.metadataset.mymetadataset AND global.metadatafield.mytestfield="mytestvalue"
if so, it should be pretty straight-forward to do. If not, I’ll have to see if there is a workaround.
To test my solutions, do I need to use your plugin to insert metadata, or is there another way?
-
reporter Yes, inserting the CQL for the metadata search in the query string works. I didn’t even think to test that beforehand.
I think it would suffice to add any CQL to the query. The metadata search in not specific in any way, you might, for example, just search for content with a specific label and type and the query string like so:
query AND label = "performance" AND type = "blogpost"
-
repo owner Great.
I already allow for things like label and type.
I’m assuming though that your metadata can be fields that do not exist in confluence ?
-
reporter Correct! These are additional fields that do not exist If the app is not installed.
-
repo owner I use the generic SiteSearch API on the backend. I’ll see if I can’t use the CQL Search engine again: https://docs.atlassian.com/atlassian-confluence/5.9.7/index.html?com/atlassian/confluence/api/service/search/CQLSearchService.html
Simply appending the CQL query to a generic search string doesn’t quite work, but this should work. Unfortunately, its going to take a bit more writing, but the CQL will allow for more powerful queries anyway.
-
repo owner Anyway, it will take me a few weeks. Please feel free to check back.
-
repo owner Can you shoot me an email offline? info@precogsoftwareservices.com
Cheers.
-
reporter Hey Nathan!
Any news on this topic?
Cheers!
-
repo owner Sorry, this fell off the back-burner. My goal here would be to provide a completely separate query. I’ll put it on my list for this up-coming week / weekend. Sorry for the delay.
-
repo owner Hey @Sven Alebrand . I looked to see if it made sense with this architecture and the short answer is no. Adaptavista makes sense excellent software for this. https://docs.adaptavist.com/sr4c/latest
Sorry I couldn’t be more help.
-
repo owner - changed status to resolved
unable to do
-
reporter Hey Nathan,
that’s a pity. Thanks for checking, anyway. I can’t see how ScriptRunner would be helping with this: They don’t provide any kind of live search, do they? Their CQL-Stuff is just “static”, on-page-load-based.
I’ll keep looking,
Greetings
Sven -
repo owner maybe not with live search. Yeah, what you want is a mix of the two. Good luck. The cloud architecture might work better as everything has to be CQL there.
- Log in to comment
Sven,
What problem are you trying to solve with the CQL-query?
It might be possible for me to allow a custom CQL search. Probably easier to do on than the server, but let me know what would make the most sense for you.
Nathan