Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

trouble with cqlSearchUtils.searchForContent() in scriptrunner script.

Karunakar Chikoti
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 24, 2021

Having issues with the - cqlSearchUtils.searchForContent()

Tying to execute the following code in the Scriptrunner Console.

import com.onresolve.scriptrunner.canned.confluence.utils.CQLSearchUtils
import com.onresolve.scriptrunner.runner.ScriptRunnerImpl

def cqlSearchUtils = ScriptRunnerImpl.scriptRunner.getBean(CQLSearchUtils)
def cqlQuery = 'space = AP' // some CQL query
def pages = cqlSearchUtils.searchForContent(cqlQuery)

Getting following error:

Error:
groovy.lang.MissingMethodException: No signature of method: com.onresolve.scriptrunner.canned.confluence.utils.CQLSearchUtils.searchForContent() is applicable for argument types: (String) values: [space = AP]
at Script96.run(Script96.groovy:8)

 

Any suggestions or alternatives?

 

Thanks.

KC

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Lee Wonnacott
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2021

Hi Karunakar,

I've added an example here that displays how you can perform a simple CQL search with ScriptRunner. 

Please let me know if this works for you! 

Kind regards, 
Lee

0 votes
ว_ว_ฒ ร__เร_อง May 12, 2022

Tying to execute the following code in the Scriptrunner Console.

import com.onresolve.scriptrunner.canned.confluence.utils.CQLSearchUtils
import com.onresolve.scriptrunner.runner.ScriptRunnerImpl

TAGS
AUG Leaders

Atlassian Community Events