19 using Lucene.Net.Support;
22 namespace Lucene.Net.Util
34 IndexReader[] subReaders = reader.GetSequentialSubReaders();
35 if (subReaders == null)
38 allSubReaders.Add(reader);
42 for (
int i = 0; i < subReaders.Length; i++)
44 GatherSubReaders(allSubReaders, subReaders[i]);
60 var subReadersList =
new System.Collections.Generic.List<
IndexReader>();
62 IndexReader[] subReaders = subReadersList.ToArray();
63 int[] docStarts =
new int[subReaders.Length];
65 for (
int i = 0; i < subReaders.Length; i++)
67 docStarts[i] = maxDoc;
68 maxDoc += subReaders[i].MaxDoc;
84 var subReadersList =
new System.Collections.Generic.List<
IndexReader>();
86 IndexReader[] subReaders = subReadersList.ToArray();
87 return subReaders[subIndex];
94 public static int SubIndex(
int n,
int[] docStarts)
98 int size = docStarts.Length;
104 int midValue = docStarts[mid];
107 else if (n > midValue)
112 while (mid + 1 < size && docStarts[mid + 1] == midValue)