Create Memory Index with Elasticsearch.net


(Serhat Topkaya) #1

Hi,

I try to create memory index with following code but it creates regular index.
Any idea?

    var node = new Uri("http://localhost:9200");
    var settings = new ConnectionSettings(node);
    var client = new Elasticsearch.Net.ElasticsearchClient(settings);
    var js = JsonConvert.SerializeObject("{settings: { index.store.type: memory}");
    var index = client.IndicesCreate("sampleIndex", js);

(Mark Walkom) #2

What version of ES?


(Serhat Topkaya) #3

The versiyon is 1.7.0, but problem solved like that ;

var body = new
                   {
                       settings = new
                       {
                           index = new
                           {
                               store = new
                               {
                                   type = "memory"
                               }
                           }
                       }
                   };

                   var index = client.Index(indexName, typeName,body);

(Mark Walkom) #4

FYI memory store will be removed in ES 2.0


(Serhat Topkaya) #5

Thank you for your inform.


(system) #6