I am working on text search(against all fields) with Jira API. One word works well. For example:
http://localhost:8888/rest/api/2/search?jql=text~Clinic
However how to query with multiple words, like
http://localhost:8888/rest/api/2/search?jql=text~Clinic Trial
I am trying to use AND
http://localhost:8888/rest/api/2/search?jql=text~"Clinic AND Trial"
Neither works.
Any suggestion?
Thanks!
Hey Ritong,
How about the below approach?
text ~ ‘clinic’ and text ~ ‘trial’
CCM
No it does not work. Here is my command
curl -D- -u username:password -X GET -H "Content-Type: application/json" http://localhost:8888/rest/api/2/search?jql=text~'Clinic' and text~'Trial'
It executed the first part but threw error in the second part
curl: (6) Could not resolve host: andcurl: (6) Could not resolve host: text~'Trial'
@Ritong Chen
Hi Ritong
curl interprets parts of your query
Can you try
curl -D- -u username:password -X GET -H "Content-Type: application/json" "http://localhost:8888/rest/api/2/search?jql=text~'Clinic' and text~'Trial'"
so double quotes around the whole url to ensure that curl takes that as one argument
Cheers
Kurt
I tried a similar thing but the API did not like it. The Java code throw similar 400 error as well.
curl -D- -u username:password -X GET -H "Content-Type: application/json" "http://localhost:8888/rest/api/2/search?jql=text~'Clinic' and text~'Trial'"HTTP/1.1 400Transfer-Encoding: chunkedDate: Mon, 06 May 2019 02:08:59 GMTConnection: close
It looks like you're new here. Sign in or register to get started.