[A] Advanced Search with Confluence CQL Error [closed]

am looking for a order function in confluence CQL.

I want to order by TYPE (page, comment, etc) How is it possible?

I tried this, but it doenst work: https://myconfluence.site/rest/api/content/search?cql=text~%22apos%22&type=page&expand=body.storage&filter=order+by+asc

Thanks for your help!

 

[A] 

It seems you mixed things up a bit :)

This query works for me and orders by id

/rest/api/content/search?cql=type=page+and+text~"apos"+order+by+id+asc&expand=body.storage

Lets see the problems one by one:

  • filter=order+by+asc This does not work, as it is part of the cql syntax
  • order+by+asc You have to tell which field should be ordered by (e.g. id or type)
  • text~%22apos%22&type=page Do not separate with "&", as it is interpreted as 2 query params and not as single cql command. You have to write the key-word "and" to combine several terms.

I hope this solves your issue. Ordering by type would not have any affect in your example as you only search for pages.

Find further information here:

[출처] https://stackoverflow.com/questions/36154567/advanced-search-with-confluence-cql-error

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

 

http://...confluence.com../rest/api/content/search?cql=type=page+and+text~"인공지능"+order+by+id+asc&expand=body.storage,history,space

 

 

final RestTemplate restTemplate = new RestTemplate();

String url = "https://www.confluence.com/rest/api/content/search?cql=type=page+and+text~\" +

                keyword + "\"+order+by+id+asc&expand=body.storage,history,space";

String response = restTemplate.getForObject(url, String.class);    // jsonp  다른 도메인 호출 예?

byte[] bytes = response.getBytes("8859_1");   // 한글 깨짐 방지

String results = new String(bytes, "UTF-8");    // 한글 깨짐 방지

return results;

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
» 아틀라시안 컴플루언스 rest Api 페이지 검색 졸리운_곰 2018.07.31 103
704 트래픽올리는 방법 졸리운_곰 2018.07.25 41
703 Excel을 활용한 선형계획 풀이 file 졸리운_곰 2018.07.23 164
702 도커파일(Dockerfiles) 졸리운_곰 2018.07.11 44
701 초보를 위한 도커 안내서 - 이미지 만들고 배포하기 file 졸리운_곰 2018.06.26 49
700 초보를 위한 도커 안내서 - 설치하고 컨테이너 실행하기 file 졸리운_곰 2018.06.26 60
699 초보를 위한 도커 안내서 - 도커란 무엇인가? file 졸리운_곰 2018.06.26 291
698 DOCKER에서 GUI프로그램을 돌려야 할 때. file 졸리운_곰 2018.06.26 34
697 XML, JSON, BSON, MSGPACK 장,단점 비교 졸리운_곰 2018.06.26 56
696 BSON 이해하기 졸리운_곰 2018.06.26 25
695 워드프레스 이메일(Wordpress Email) 설정 ( Mailgun 의 SMTP 서비스 활용) file 졸리운_곰 2018.06.22 92
694 SQL과 NoSQL의 장점을 결합한 NewSQL에 대해 file 졸리운_곰 2018.06.21 86
693 "새로운 SQL이 뜬다" SQL과 NoSQL의 장점 결합한 NewSQL 졸리운_곰 2018.06.21 72
692 아마존 킨들에 영한사전 넣는 방법 file 졸리운_곰 2018.06.14 239
691 Scaffold로 빠르게 웹 서비스 개발하기 file 졸리운_곰 2018.06.09 37
690 Docker 명령어 정리 졸리운_곰 2018.06.09 53
689 Dockerfile 명령어 정리 졸리운_곰 2018.06.09 41
688 아주 간단한 Docker 사용법 정리 file 졸리운_곰 2018.06.09 38
687 [Docker] Docker 기본 사용법 정리 졸리운_곰 2018.06.09 40
686 일반 PHP 프로젝트 개발 환경에서 docker 사용하기 file 졸리운_곰 2018.06.06 53
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED