Вопрос

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