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

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.

主站蜘蛛池模板: 八宿县| 邯郸县| 白朗县| 运城市| 城步| 集贤县| 富裕县| 本溪市| 连江县| 汾阳市| 调兵山市| 沾化县| 岢岚县| 岑溪市| 林甸县| 天柱县| 普陀区| 聂荣县| 龙海市| 双峰县| 藁城市| 辽宁省| 云龙县| 曲周县| 徐州市| 惠州市| 格尔木市| 雷州市| 正镶白旗| 甘洛县| 宁陕县| 石景山区| 徐州市| 上杭县| 林西县| 望谟县| 怀柔区| 红桥区| 凌源市| 鹤庆县| 资源县|