조회 참조

Discovery 조회 매개변수, 연산자 및 집계의 전체 목록입니다. 이 정보를 참조하여 Discovery 쿼리 언어를 사용하여 쿼리를 작성할 때 도움을 받을 수 있습니다.

  • 자세한 내용은 Discovery API 참조를 참조하세요.
  • 조회 개념 개요는 조회 개요를 참조하십시오.

Discovery 의 사용자 인터페이스에서 개선 및 사용자 정의 페이지 에서 자연어 쿼리를 작성하고 테스트할 수 있습니다.

매개변수 설명

쿼리 매개변수를 사용하여 컬렉션을 검색하고, 결과 집합을 식별하고, 결과 집합을 분석할 수 있습니다.

검색 매개변수
매개변수 설명 예
aggregation 결과 세트의 통계 조회 aggregation=term(enriched_text.entities.type)
filter 일치하는 문서에 대한 순위 지정되지 않은 조회 언어 검색 filter=bees
natural_language_query 일치하는 문서에 대한 순위 지정된 자연어 검색 natural_language_query="How do bees fly"
query 일치하는 문서에 대한 순위 지정된 조회 언어 검색 query=bees
구조 매개변수
매개변수 설명 예
count 리턴할 result 문서 수 count=15
highlight 쿼리 일치 강조표시 highlight=true
offset 결과 세트에서 result 문서를 리턴하기 전에 무시할 결과 수 offset=100
return 리턴할 필드의 목록 return=title,url
sort 결과 세트를 정렬할 기준 필드 sort=enriched_text.sentiment.document.score
spelling suggestions 자연어 조회에 대해 리턴된 맞춤법 제안사항 spelling_suggestions=true

쿼리 제한사항

다음 문자가 포함된 필드 이름은 쿼리할 수 없습니다

  • 필드 이름의 접미사에 숫자(0 - 9)를 추가합니다. 예를 들어, extracted-content2입니다.
  • field_name 의 접두사에 있는 문자 _, +, -. 예를 들어, +extracted-content입니다.
  • ., , 및 : 문자는 field_name 에 포함됩니다. 예를 들어, new:extracted-content입니다.

연산자

연산자는 조회의 서로 다른 파트 사이의 구분 기호입니다. 다음 표에는 사용 가능한 연산자가 나열되어 있습니다.

쿼리 연산자
연산자 설명 예
. JSON 구분 기호 enriched_text.concepts.text
: 포함 text:computer
:: 정확하게 일치 title::"Query building"
:! 포함하지 않음 text:!computer
::! 정확한 일치가 아님 text::!winter
\ 이스케이프 문자 title::"Dorothy said: \"There's no place like home.\""
"" 구문 쿼리 enriched_text.concepts.text:"IBM Watson"
(), [] 중첩된 그룹 filter-entities:(text:Turkey,type:Location)
| 또는 query-enriched.entities.text:Google|IBM
, 및 query-enriched.entities.text:Google,IBM
<=, >=, >, < 숫자 비교 enriched_text.sentiment.document.score>0.679
^x 점수 승수 text:IBM^3
* 와일드카드 query-enriched_text.concepts.text:pre*
~n 문자열 변형 query-enriched_text.entities.text:cat~1
:* 존재 title:*
!* 존재하지 않음 title!*

집계

집계에서는 데이터 값 세트를 리턴합니다. 다음 표에는 사용 가능한 집계가 나열되어 있습니다.

조회 집계
집계 설명 예
average 결과 세트에 있는 지정된 필드의 평균값 average(product.price)
filter 지정된 패턴에 따라 결과 필터링 filter(enriched_text.concepts.text:cloud computing)
histogram 간격 기반 분포 histogram(product.price,interval:1)
max 결과 세트에 있는 지정된 필드의 최대값 max(product.price)
min 결과 세트에 있는 지정된 필드의 최소값 min(product.price)
nested 집계 제한 nested(enriched_text.entities)
sum 결과 세트에 있는 모든 필드의 합계 sum(product.price)
term 동일한 값의 개수 term(enriched_text.concepts.text,count:10)
timeslice 시간 기반 배포 timeslice(last_modified,2day,America/New York)
top_hits 현재 집계에 대한 상위 순위 결과 문서 term(enriched_text.concepts.text).top_hits(10)
unique_count 집계 내 필드의 고유 값 개수 unique_count(enriched_text.entities.type)