// append fields from storedFieldReaders public override Document Document(int n, FieldSelector fieldSelector) { EnsureOpen(); Document result = new Document(); for (int i = 0; i < storedFieldReaders.Count; i++) { IndexReader reader = (IndexReader)storedFieldReaders[i]; bool include = (fieldSelector == null); if (!include) { System.Collections.IEnumerator it = ((System.Collections.ICollection)readerToFields[reader]).GetEnumerator(); while (it.MoveNext()) { if (fieldSelector.Accept((System.String)it.Current) != FieldSelectorResult.NO_LOAD) { include = true; break; } } } if (include) { System.Collections.IEnumerator fieldIterator = reader.Document(n, fieldSelector).GetFields().GetEnumerator(); while (fieldIterator.MoveNext()) { result.Add((Fieldable)fieldIterator.Current); } } } return(result); }
// append fields from storedFieldReaders public override Document Document(int n, FieldSelector fieldSelector, IState state) { EnsureOpen(); Document result = new Document(); foreach (IndexReader reader in storedFieldReaders) { bool include = (fieldSelector == null); if (!include) { var fields = readerToFields[reader]; foreach (var field in fields) { if (fieldSelector.Accept(field) != FieldSelectorResult.NO_LOAD) { include = true; break; } } } if (include) { var fields = reader.Document(n, fieldSelector, state).GetFields(); foreach (var field in fields) { result.Add(field); } } } return(result); }
// append fields from storedFieldReaders public override Document Document(int n, FieldSelector fieldSelector) { EnsureOpen(); Document result = new Document(); for (int i = 0; i < storedFieldReaders.Count; i++) { IndexReader reader = storedFieldReaders[i]; bool include = (fieldSelector == null); if (!include) { foreach (string x in readerToFields[reader]) { if (fieldSelector.Accept(x) != FieldSelectorResult.NO_LOAD) { include = true; break; } } } if (include) { foreach (Fieldable f in reader.Document(n, fieldSelector).GetFields()) { result.Add(f); } } } return(result); }
// append fields from storedFieldReaders public override Document Document(int n, FieldSelector fieldSelector) { EnsureOpen(); Document result = new Document(); for (int i = 0; i < storedFieldReaders.Count; i++) { IndexReader reader = (IndexReader) storedFieldReaders[i]; bool include = (fieldSelector == null); if (!include) { System.Collections.IEnumerator it = ((System.Collections.ICollection) readerToFields[reader]).GetEnumerator(); while (it.MoveNext()) { if (fieldSelector.Accept((System.String) it.Current) != FieldSelectorResult.NO_LOAD) { include = true; break; } } } if (include) { System.Collections.IEnumerator fieldIterator = reader.Document(n, fieldSelector).GetFields().GetEnumerator(); while (fieldIterator.MoveNext()) { result.Add((Fieldable) fieldIterator.Current); } } } return result; }
// append fields from storedFieldReaders public override Document Document(int n, FieldSelector fieldSelector) { EnsureOpen(); Document result = new Document(); foreach(IndexReader reader in storedFieldReaders) { bool include = (fieldSelector == null); if (!include) { var fields = readerToFields[reader]; foreach(var field in fields) { if (fieldSelector.Accept(field) != FieldSelectorResult.NO_LOAD) { include = true; break; } } } if (include) { var fields = reader.Document(n, fieldSelector).GetFields(); foreach(var field in fields) { result.Add(field); } } } return result; }
// append fields from storedFieldReaders public override Document Document(int n, FieldSelector fieldSelector) { EnsureOpen(); Document result = new Document(); for (int i = 0; i < storedFieldReaders.Count; i++) { IndexReader reader = storedFieldReaders[i]; bool include = (fieldSelector == null); if (!include) { foreach (string x in readerToFields[reader]) { if (fieldSelector.Accept(x) != FieldSelectorResult.NO_LOAD) { include = true; break; } } } if (include) { foreach(Fieldable f in reader.Document(n, fieldSelector).GetFields()) { result.Add(f); } } } return result; }