문제

I am new to PyES, the documentation is somewhat hard to read.

I want to index data into ES and I see this:

conn.index({"name":"Joe Tester", "parsedtext":"Joe Testere nice guy", "uuid":"11111", "position":1}, "test-index", "test-type", 1)

I get the first 2 args but what are the last two? Namely "test-type" and 1? Where are the docs that explain the args for index as it relates to the above?

도움이 되었습니까?

해결책

test-type - it is like collections in a NOSQL database and In RDBMS it like tables in data base.

The last argument "1" is unique identifier of document.Like primary key in RDBMS and _id in NOSQL..

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top