Difference between revisions of "C180913155810"

From FindAndLearn::Cookbook
C180913155810
Jump to: navigation, search
(Create a new index from an existing index)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Recipe
 
{{Recipe
|HasEntityTitle=Index new information
+
|HasEntityTitle=Indexing
 
}}
 
}}
  
Indexing new information requires the following steps:
+
== Create/update an index from a datastore ==
  
# Find out [[C0579362098|how to obtain the Resources from a ResourceSilo]].
+
* Automatic updates
#* Examples:
+
* Reindexing
# Decide on how to entitize individual Resources.
+
 
#* Examples:
+
== Create a new index from an existing index ==
# Write [[C0629663338|"class MyResourceIndexer < Indexer"]] that:
+
 
## obtains a facet of Resources from the ResourceSilo ("def ajsonResourceURIs")
+
In Kibana [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html create a new index] (ideally use [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html index templates])
## entitizes the resources in accordance with a SetOfRules
+
 
##
+
In Kibana [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html post a _reindex]
 +
 
 +
<syntaxhighlight lang=json>
 +
POST _reindex
 +
{
 +
  "source": {
 +
    "index": "mediawiki_5d43fac436892d0011e759d6"
 +
  },
 +
  "dest": {
 +
    "index": "mediawiki_all"
 +
  }
 +
}
 +
</syntaxhighlight>
 +
 
 +
The destination index will automatically be created applying index-pattern-matching index templates.

Latest revision as of 13:40, 12 September 2019





Create/update an index from a datastore

  • Automatic updates
  • Reindexing

Create a new index from an existing index

In Kibana create a new index (ideally use index templates)

In Kibana post a _reindex

POST _reindex
{
  "source": {
    "index": "mediawiki_5d43fac436892d0011e759d6"
  },
  "dest": {
    "index": "mediawiki_all"
  }
}

The destination index will automatically be created applying index-pattern-matching index templates.