/// <summary>
 /// Initializes a new instance of the <see cref="AzureSearchWithSpatialContext"/> class.
 /// </summary>
 /// <param name="index">
 /// The index.
 /// </param>
 /// <param name="options">
 /// The options.
 /// </param>
 public AzureSearchWithSpatialContext(CloudSearchProviderIndex index, SearchSecurityOptions options = SearchSecurityOptions.EnableSecurityCheck)
     : base(index, options)
 {
     Assert.ArgumentNotNull((object)index, "index");
     Assert.ArgumentNotNull((object)options, "options");
     this.index = index;
     this.contentSearchSettings = this.index.Locator.GetInstance <IContentSearchConfigurationSettings>();
     this.settings        = this.index.Locator.GetInstance <ISettings>();
     this.securityOptions = options;
 }
Exemple #2
0
 public virtual void Initialize(ISearchIndex index)
 {
     _searchIndex = index as CloudSearchProviderIndex;
     if (_searchIndex == null)
     {
         throw new NotSupportedException($"Only {typeof(CloudSearchProviderIndex).Name} is supported");
     }
     DocumentOperations.Observer = AvailabilityManager as IHttpMessageObserver;
     SchemaSynchronizer.ManagmentOperations.Observer = AvailabilityManager as IHttpMessageObserver;
     SchemaSynchronizer.ScoringProfilesRepository    = _searchIndex.CloudConfiguration.ScoringProfilesRepository;
 }
 /// <summary>
 /// The initialize.
 /// </summary>
 /// <param name="searchIndex">
 /// The search index.
 /// </param>
 public new void Initialize(ISearchIndex searchIndex)
 {
     this.searchIndex = searchIndex as CloudSearchProviderIndex;
     base.Initialize(searchIndex);
 }