Ejemplo n.º 1
0
		public IndexDefinition()
		{
			// settings the default values
			IndexSettings = new IndexSettings {NumberOfReplicas = 1, NumberOfShards = 5};
			IndexAliases = new IndexAliases();
			IndexWarmers = new IndexWarmers();
			Mapping = new MappingDefinition();
		}
Ejemplo n.º 2
0
 public IndexDefinition()
 {
     // settings the default values
     IndexSettings = new IndexSettings {
         NumberOfReplicas = 1, NumberOfShards = 5
     };
     IndexAliases = new IndexAliases();
     IndexWarmers = new IndexWarmers();
     Mapping      = new MappingDefinition();
 }
Ejemplo n.º 3
0
		public void CreateIndexSettingsForDocument(string index, IndexSettings indexSettings, IndexAliases indexAliases, IndexWarmers indexWarmers)
		{
			if (_processedItems.Contains("_index" + index))
			{
				return;
			}
			_processedItems.Add("_index" + index);
			var elasticsearchCrudJsonWriter = new ElasticsearchCrudJsonWriter();
			elasticsearchCrudJsonWriter.JsonWriter.WriteStartObject();
			CreateIndexSettings(elasticsearchCrudJsonWriter, indexSettings);
			indexAliases.WriteJson(elasticsearchCrudJsonWriter);
			indexWarmers.WriteJson(elasticsearchCrudJsonWriter);
			elasticsearchCrudJsonWriter.JsonWriter.WriteEndObject();

			CreateIndexCommand(elasticsearchCrudJsonWriter.GetJsonString(), index);
		}