Ejemplo n.º 1
0
 private void SetFieldInResponse(NamedIndexElement element)
 {
     this._fieldInResponse.Add(IndexingServiceSettings.DefaultFieldName, false);
     this._fieldInResponse.Add(IndexingServiceSettings.IdFieldName, element.IdFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.TitleFieldName, element.TitleFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.DisplayTextFieldName, element.DisplayTextFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.AuthorsFieldName, element.AuthorFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.CreatedFieldName, element.CreatedFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.ModifiedFieldName, element.ModifiedFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.UriFieldName, element.UriFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.TypeFieldName, element.TypeFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.CultureFieldName, element.CultureFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.CategoriesFieldName, element.CategoriesFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.AclFieldName, element.AclFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.ReferenceIdFieldName, element.ReferenceFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.MetadataFieldName, element.MetadataFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.VirtualPathFieldName, element.VirtualPathFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.AuthorStorageFieldName, false);
     this._fieldInResponse.Add(IndexingServiceSettings.PublicationEndFieldName, element.PublicationEndFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.PublicationStartFieldName, element.PublicationStartFieldInResponse);
     this._fieldInResponse.Add(IndexingServiceSettings.ItemStatusFieldName, element.ItemStatusFieldInResponse);
 }
Ejemplo n.º 2
0
 internal NamedIndex(string name, bool useRefIndex)
 {
     this._namedIndex = (string.IsNullOrEmpty(name) ? IndexingServiceSettings.DefaultIndexName : name);
     if (IndexingServiceSettings.NamedIndexDirectories.ContainsKey(this._namedIndex))
     {
         if (useRefIndex)
         {
             this.Directory = IndexingServiceSettings.ReferenceIndexDirectories[this._namedIndex];
             this.ReferenceDirectoryInfo = IndexingServiceSettings.ReferenceDirectoryInfos[this._namedIndex];
         }
         else
         {
             this.Directory              = IndexingServiceSettings.NamedIndexDirectories[this._namedIndex];
             this.ReferenceDirectory     = IndexingServiceSettings.ReferenceIndexDirectories[this._namedIndex];
             this.ReferenceDirectoryInfo = IndexingServiceSettings.ReferenceDirectoryInfos[this._namedIndex];
             this.DirectoryInfo          = IndexingServiceSettings.MainDirectoryInfos[this._namedIndex];
         }
         NamedIndexElement namedIndexElement = IndexingServiceSettings.NamedIndexElements[this._namedIndex];
         this.PendingDeletesOptimizeThreshold = namedIndexElement.PendingDeletesOptimizeThreshold;
         this.ReadOnly = namedIndexElement.ReadOnly;
         this.SetFieldInResponse(namedIndexElement);
         this.IsValid = true;
     }
 }