官术网_书友最值得收藏!

How it works

Elasticsearch is both a NoSQL database and a search engine. You give documents to Elasticsearch and it parses the data in the documents and creates search indexes for that data automatically.

During the insertion process, we used the elasticsearch libraries' .index() method and specified an index, named "planets", a document type, planets_info, and the finally the body of the document, which is our planet Python object. The elasticsearch library that object to JSON and sends it off to Elasticsearch for storage and indexing.

The index parameter is used to inform Elasticsearch how to create an index, which it will use for indexing and which we can use to specify a set of documents to search for when we query. When we performed the query, we specified the same index "planets" and executed a query to match all of the documents.

主站蜘蛛池模板: 沙坪坝区| 平泉县| 团风县| 江城| 阳江市| 定兴县| 鸡西市| 乌兰浩特市| 深泽县| 蒲江县| 天水市| 宝丰县| 克拉玛依市| 漠河县| 铁岭县| 濮阳县| 富民县| 太保市| 平谷区| 望城县| 武功县| 巴塘县| 临夏县| 永寿县| 玉溪市| 宾阳县| 武汉市| 治多县| 泉州市| 黄梅县| 光泽县| 丽水市| 牡丹江市| 阜城县| 元江| 红原县| 平遥县| 门源| 陇川县| 渑池县| 霍城县|