private void LoadSchema() { _luceneSchemaCollection = new LuceneSchemaCollection(); var doc = _luceneDocumentCollection[_schemaDocName]; var table = doc.GetAllDocuments(); if (table == null) { return; } foreach (DataRow row in table.Rows) { _luceneSchemaCollection.Add(new LuceneSchema(row["name"].ToString(), row["id"].ToString())); } foreach (var schema in _luceneSchemaCollection) { LoadIndexes(schema); } }
private void init() { CheckDirectory(_rootPath); CheckDirectory(_schemaPath); _luceneDocumentCollection = new LuceneDocumentCollection(); _luceneSchemaCollection = new LuceneSchemaCollection(); _indexCollection = new Dictionary <string, Dictionary <string, string> >(); var docSchema = new LuceneDocument(_schemaPath); _luceneDocumentCollection.Add(_schemaDocName, docSchema); LoadSchema(); }