Question

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?

Was it helpful?

Solution

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..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top