19 using System.Collections;
20 using System.Configuration;
23 using Lucene.Net.Distributed;
25 namespace Lucene.Net.Distributed.Configuration
46 private string _strLocation;
56 XmlAttributeCollection attributeCollection = xSection.Attributes;
57 if (attributeCollection == null)
58 throw new ConfigurationErrorsException(
"xSection.Attributes invalid: " + Environment.NewLine + xSection.OuterXml);
62 this._id = Convert.ToInt32(attributeCollection[
"id"].Value);
66 throw new ConfigurationErrorsException(
"DistributedSearcher.id invalid: " + Environment.NewLine + xSection.OuterXml + Environment.NewLine + e.Message);
75 throw new ConfigurationErrorsException(
"DistributedSearcher.SearchMethod invalid: " + Environment.NewLine + xSection.OuterXml);
80 this._strLocation = attributeCollection[
"Location"].Value;
84 throw new ConfigurationErrorsException(
"DistributedSearcher.Location invalid: " + Environment.NewLine + xSection.OuterXml);
90 if (!Lucene.Net.Index.IndexReader.IndexExists(
this.Location))
91 throw new ConfigurationErrorsException(
"DistributedSearcher.Location not an index: " + Environment.NewLine +
this.Location);
106 get {
return this._id; }
114 get {
return this._eSearchMethod;}
121 public string Location
123 get {
return this._strLocation;}