Indices, scroll API, and Sorting related questions


(Hassan Shaitou) #1

I- Regarding indices:
1- Why we can't create two different document types for the same index?
2- Will creating 500 index for example affect the performance of elastic?

II- Regarding Scroll API:
1- I want to extract a specific name (property) from elasticsearch, I paginate them with size(10000). The
problems are:
1.1- I want a way to parse the whole pages in NEST C#.(i.e I have 2 million records, so the number of
pages is 200 with 10000 document each).

III- Regarding Sort:
I have the following

var response = client.Search<MyObject>(s => s
			  .Index(indices)
			  .Type(types)
			  .MatchAll()
              .Sort(ss=>ss.Ascending(asc=>asc.name))
			  .Size(10000)
			  .Scroll("10m")
			  .Pretty()
			);

class MyObject:

public class MyObject
		{
			public string age { get; set; }
			public string lastname { get; set; }
			public string name { get; set; }
		}

I want to sort according to _id field.

Please help and thanks in advance.


(David Pilato) #2

I: read: https://www.elastic.co/blog/removal-of-mapping-types-elasticsearch

II and III I don't really understand. May be it's more a Nest related question, which I don't know.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.