http://www.basef.com.br/index.php?title=Inserindo_dados_em_massa_no_Elastic_Search&feed=atom&action=history
Inserindo dados em massa no Elastic Search - Histórico de revisão
2024-03-29T00:20:01Z
Histórico de revisões para esta página neste wiki
MediaWiki 1.26alpha
http://www.basef.com.br/index.php?title=Inserindo_dados_em_massa_no_Elastic_Search&diff=821&oldid=prev
Admin em 21h08min de 1 de agosto de 2017
2017-08-01T21:08:38Z
<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='pt-BR'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Edição anterior</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Edição das 21h08min de 1 de agosto de 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="L139" >Linha 139:</td>
<td colspan="2" class="diff-lineno">Linha 139:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">Note a </del>quebra de linha após o último documento<del class="diffchange diffchange-inline">, ela é importante</del>.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">Nota: É necessário uma </ins>quebra de linha após o último documento.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category: Elastic Search]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category: Elastic Search]]</div></td></tr>
</table>
Admin
http://www.basef.com.br/index.php?title=Inserindo_dados_em_massa_no_Elastic_Search&diff=820&oldid=prev
Admin em 21h07min de 1 de agosto de 2017
2017-08-01T21:07:08Z
<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='pt-BR'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Edição anterior</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Edição das 21h07min de 1 de agosto de 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="L136" >Linha 136:</td>
<td colspan="2" class="diff-lineno">Linha 136:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>{"create": {}}</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>{"create": {}}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>{"nome": "Abner Alves de Oliveira", "cidade": "Altinopolis", "formação": "Letras", "estado": "SP", "país": "Brasil", "interesses": ["artes","pintura","teatro"] }</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>{"nome": "Abner Alves de Oliveira", "cidade": "Altinopolis", "formação": "Letras", "estado": "SP", "país": "Brasil", "interesses": ["artes","pintura","teatro"] }</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Note a quebra de linha após o último documento, ela é importante.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category: Elastic Search]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category: Elastic Search]]</div></td></tr>
</table>
Admin
http://www.basef.com.br/index.php?title=Inserindo_dados_em_massa_no_Elastic_Search&diff=819&oldid=prev
Admin: Criou página com 'Criação do índice: <source lang="javascript"> PUT /pessoas { "settings": { "index": { "number_of_shards": 3, "number_of_replicas": 0 }, "analysis...'
2017-08-01T21:06:06Z
<p>Criou página com 'Criação do índice: <source lang="javascript"> PUT /pessoas { "settings": { "index": { "number_of_shards": 3, "number_of_replicas": 0 }, "analysis...'</p>
<p><b>Página nova</b></p><div>Criação do índice:<br />
<br />
<source lang="javascript"><br />
PUT /pessoas<br />
{<br />
"settings": {<br />
"index": {<br />
"number_of_shards": 3,<br />
"number_of_replicas": 0<br />
},<br />
"analysis": {<br />
"filter": {<br />
"portuguese_stop": {<br />
"type": "stop",<br />
"stopwords": "_portuguese_" <br />
},<br />
"portuguese_stemmer": {<br />
"type": "stemmer",<br />
"language": "light_portuguese"<br />
},<br />
"filtro_de_sinonimos": {<br />
"type": "synonym",<br />
"synonyms": [<br />
"futebol => futebol,society",<br />
"society => society,futebol",<br />
"volei,voleibol,volleyball",<br />
"esport => esport,futebol,society,volei,basquet",<br />
"exat => exat,matematic,fisic,computaca",<br />
"arte => arte,pintur,teatr,music,cinem"<br />
]<br />
}<br />
},<br />
"analyzer": {<br />
"sinonimos": {<br />
"tokenizer": "standard",<br />
"filter": [<br />
"lowercase",<br />
"portuguese_stop",<br />
"portuguese_stemmer",<br />
"filtro_de_sinonimos"<br />
]<br />
}<br />
}<br />
}<br />
},<br />
"mappings": {<br />
"registros": {<br />
"_all": {<br />
"type": "string",<br />
"index": "analyzed",<br />
"analyzer": "portuguese"<br />
},<br />
"properties": {<br />
"cidade": {<br />
"type": "string",<br />
"fields": {<br />
"original": { <br />
"type": "string", <br />
"index": "not_analyzed" <br />
}<br />
},<br />
"index": "analyzed",<br />
"analyzer": "portuguese"<br />
},<br />
"estado": {<br />
"type": "string",<br />
"index": "not_analyzed" <br />
},<br />
"formação": {<br />
"type": "string",<br />
"fields": {<br />
"original": { <br />
"type": "string", <br />
"index": "not_analyzed" <br />
}<br />
},<br />
"index": "analyzed",<br />
"analyzer": "portuguese"<br />
},<br />
"interesses": {<br />
"type": "string",<br />
"index": "analyzed",<br />
"analyzer": "portuguese",<br />
"search_analyzer": "sinonimos"<br />
},<br />
"nome": {<br />
"type": "string",<br />
"fields": {<br />
"original": { <br />
"type": "string", <br />
"index": "not_analyzed" <br />
}<br />
},<br />
"index": "analyzed",<br />
"analyzer": "portuguese"<br />
},<br />
"país": {<br />
"type": "string",<br />
"fields": {<br />
"original": { <br />
"type": "string", <br />
"index": "not_analyzed" <br />
}<br />
},<br />
"index": "analyzed",<br />
"analyzer": "portuguese"<br />
}<br />
}<br />
}<br />
}<br />
}<br />
</source><br />
<br />
Exemplo de inserção de 10 documentos em massa:<br />
<br />
<source lang="javascript"><br />
POST /pessoas/registros/_bulk<br />
{"create": {}}<br />
{"nome": "Abdalla Yussef Tauil Neto", "cidade": "São José do Rio Claro", "formação": "Letras", "estado": "MT", "país": "Brasil", "interesses": ["futebol","society","volei"] }<br />
{"create": {}}<br />
{"nome": "Abdullah Hassan Akram Fayad", "cidade": "Senhora da Gloria", "formação": "Física", "estado": "MG", "país": "Brasil", "interesses": ["basquete"] }<br />
{"create": {}}<br />
{"nome": "Abdy Augusto Silva", "cidade": "Tamboril do Piaui", "formação": "Artes Cênicas", "estado": "PI", "país": "Brasil", "interesses": ["futebol","society","volei","voleibol"] }<br />
{"create": {}}<br />
{"nome": "Abel dos Santos Beserra", "cidade": "Arapongas", "formação": "Artes Cênicas", "estado": "PR", "país": "Brasil", "interesses": [] }<br />
{"create": {}}<br />
{"nome": "Abelardo Fukasawa Borges", "cidade": "Bação", "formação": "Estatística", "estado": "MG", "país": "Brasil", "interesses": ["society"] }<br />
{"create": {}}<br />
{"nome": "Abhner Matheus Londero Rossini", "cidade": "Teixeira", "formação": "Estatística", "estado": "PB", "país": "Brasil", "interesses": ["artes","pintura"] }<br />
{"create": {}}<br />
{"nome": "Abidan Henrique da Silva", "cidade": "Bom Jesus", "formação": "Artes Cênicas", "estado": "SC", "país": "Brasil", "interesses": [] }<br />
{"create": {}}<br />
{"nome": "Abigail Lanuza de Novais Moreira", "cidade": "Monte Alegre", "formação": "Estatística", "estado": "SC", "país": "Brasil", "interesses": [] }<br />
{"create": {}}<br />
{"nome": "Abilio Augusto Jose Forni", "cidade": "Olho D'Água Do Casado", "formação": "História", "estado": "AL", "país": "Brasil", "interesses": ["volei","voleibol","volleyball","basquete"] }<br />
{"create": {}}<br />
{"nome": "Abner Alves de Oliveira", "cidade": "Altinopolis", "formação": "Letras", "estado": "SP", "país": "Brasil", "interesses": ["artes","pintura","teatro"] }<br />
</source><br />
<br />
[[Category: Elastic Search]]</div>
Admin