정수 배열 데이터 유형에 얼마나 복잡한 쿼리를 사용할 수 있습니까? 여기 파이썬에서 내 수업이 elasticsearch
에 데이터를 삽입하는 것입니다 : 내가 캡처 정수의 배열을 주입하고python_dsl을 사용하여 elasticsearch에서 배열 데이터 유형 쿼리
class Paragraph(DocType):
body = Text(analyzer="standard")
published_from = Date()
lines = Integer()
n_paragraph = Integer()
capture = Integer()
class Meta:
index = "my_index"
def save(self, **kwargs):
self.lines = len(self.body.split())
return super(Paragraph, self).save(**kwargs)
. 여기에 흥미로운 라인은 다음과 같습니다
paragraph.capture = [1, 0, 5, 7]
나는이 숫자 목록 ::에있는 경우 쿼리 관리
cnx = Search().using(client) s = cnx.query("match", capture=5)
@val 우리가 쿼리 합계를 포함하는 다른 필드를 추가 할 수 있습니다 말했듯 합계
특정 색인을 어떻게 조회 할 것인가? paragraph.capture[1] >= 1
?
우리는 Elasticsearch query on array index이 관련되어 있음을 확인했지만 링크를 만들 수 없습니다.