public LuceneIndexManager(
            IClock clock,
            IOptions <ShellOptions> shellOptions,
            ShellSettings shellSettings,
            ILogger <LuceneIndexManager> logger,
            LuceneAnalyzerManager luceneAnalyzerManager,
            LuceneIndexSettingsService luceneIndexSettingsService
            )
        {
            _clock    = clock;
            _logger   = logger;
            _rootPath = PathExtensions.Combine(
                shellOptions.Value.ShellsApplicationDataPath,
                shellOptions.Value.ShellsContainerName,
                shellSettings.Name, "Lucene");
            Directory.CreateDirectory(_rootPath);
            _luceneAnalyzerManager      = luceneAnalyzerManager;
            _luceneIndexSettingsService = luceneIndexSettingsService;

            // Typical geospatial context
            // These can also be constructed from SpatialContextFactory
            _ctx = SpatialContext.Geo;

            var maxLevels = 11; // Results in sub-meter precision for geohash

            // TODO demo lookup by detail distance
            // This can also be constructed from SpatialPrefixTreeFactory
            _grid = new GeohashPrefixTree(_ctx, maxLevels);
        }
Beispiel #2
0
 public LuceneQuerySource(
     LuceneIndexManager luceneIndexProvider,
     LuceneIndexSettingsService luceneIndexSettingsService,
     LuceneAnalyzerManager luceneAnalyzerManager,
     ILuceneQueryService queryService,
     ILiquidTemplateManager liquidTemplateManager,
     ISession session)
 {
     _luceneIndexProvider        = luceneIndexProvider;
     _luceneIndexSettingsService = luceneIndexSettingsService;
     _luceneAnalyzerManager      = luceneAnalyzerManager;
     _queryService          = queryService;
     _liquidTemplateManager = liquidTemplateManager;
     _session = session;
 }
 public LuceneIndexingService(
     IShellHost shellHost,
     ShellSettings shellSettings,
     LuceneIndexingState indexingState,
     LuceneIndexSettingsService luceneIndexSettingsService,
     LuceneIndexManager indexManager,
     IIndexingTaskManager indexingTaskManager,
     ISiteService siteService,
     ILogger <LuceneIndexingService> logger)
 {
     _shellHost     = shellHost;
     _shellSettings = shellSettings;
     _indexingState = indexingState;
     _luceneIndexSettingsService = luceneIndexSettingsService;
     _indexManager        = indexManager;
     _indexingTaskManager = indexingTaskManager;
     _siteService         = siteService;
     _logger = logger;
 }
 public LuceneQuerySource(
     LuceneIndexManager luceneIndexProvider,
     LuceneIndexSettingsService luceneIndexSettingsService,
     LuceneAnalyzerManager luceneAnalyzerManager,
     ILuceneQueryService queryService,
     ILiquidTemplateManager liquidTemplateManager,
     ISession session,
     JavaScriptEncoder javaScriptEncoder,
     IOptions <TemplateOptions> templateOptions)
 {
     _luceneIndexProvider        = luceneIndexProvider;
     _luceneIndexSettingsService = luceneIndexSettingsService;
     _luceneAnalyzerManager      = luceneAnalyzerManager;
     _queryService          = queryService;
     _liquidTemplateManager = liquidTemplateManager;
     _session           = session;
     _javaScriptEncoder = javaScriptEncoder;
     _templateOptions   = templateOptions.Value;
 }
Beispiel #5
0
        public LuceneIndexManager(
            IClock clock,
            IOptions <ShellOptions> shellOptions,
            ShellSettings shellSettings,
            ILogger <LuceneIndexManager> logger,
            LuceneAnalyzerManager luceneAnalyzerManager,
            LuceneIndexSettingsService luceneIndexSettingsService
            )
        {
            _clock    = clock;
            _logger   = logger;
            _rootPath = PathExtensions.Combine(
                shellOptions.Value.ShellsApplicationDataPath,
                shellOptions.Value.ShellsContainerName,
                shellSettings.Name, "Lucene");

            Directory.CreateDirectory(_rootPath);
            _luceneAnalyzerManager      = luceneAnalyzerManager;
            _luceneIndexSettingsService = luceneIndexSettingsService;
        }
Beispiel #6
0
 public Permissions(LuceneIndexSettingsService luceneIndexSettingsService)
 {
     _luceneIndexSettingsService = luceneIndexSettingsService;
 }