郵便配達のライブラリを使用して索引を作成します。

免責事項:この記事はブロガーオリジナル記事です、続くBY-SAのCC 4.0を著作権契約、複製、元のソースのリンクと、この文を添付してください。
このリンク: https://blog.csdn.net/caoxuecheng001/article/details/102678609

インデックスのない図書館、直接インデックスデータベースと情報を追加

URLは次のとおりです。HTTP:// localhostを:9200 / blog1のPUTタイプ

{
	"mappings":{
		"article":{
			"properties":{
				"id":{
					"type":"long",
					"store":true
					
				},
				"title":{
					"type":"text",
					"store":true,
					"index":true,
					"analyzer":"standard"
				},
				"content":{
					"type":"text",
					"store":true,
					"index":true,
					"analyzer":"standard"
				}
			}
		}
	}
}

これは、記事の種類をblog1のデータベースのインデックスを作成します

また、最初のライブラリの後にインデックスを作成し、入力した情報を追加することができ、

{

		"hello":{
			"properties":{
				"id":{
					"type":"long",
					"store":true
					
				},
				"title":{
					"type":"text",
					"store":true,
					"index":true,
					"analyzer":"standard"
				},
				"content":{
					"type":"text",
					"store":true,
					"index":true,
					"analyzer":"standard"
				}
			}
		}
	
}

URLは  、HTTP:// localhostを:9200 /ブログ /ハロー/ _mappingsポストタイプ

上記のような効果。

おすすめ

転載: blog.csdn.net/caoxuecheng001/article/details/102678609