protected AbstractDocumentBuilder(IStorageIndex index, string contentType) { this.contentType = contentType; Document = new Document(); configuration = index.Configuration; }
private DocumentBuilderContext(IIndexConfiguration configuration, DocumentBuilderContext parent, string contentType, JObject json, string path) { Configuration = configuration; Parent = parent; Path = path; Json = json; ContentType = contentType; strategy = new Lazy <IIndexingVisitorStrategy>(() => Configuration.Field.Strategy(ContentType, Path).IndexingStrategy); }
public DotJemAnalyzer(Version matchVersion, IIndexConfiguration configuration = null, ISet <string> stopwords = null) { MaxTokenLength = byte.MaxValue; enableStopPositionIncrements = StopFilter.GetEnablePositionIncrementsVersionDefault(matchVersion); replaceInvalidAcronym = matchVersion.OnOrAfter(Version.LUCENE_24); this.stopSet = stopwords ?? StopAnalyzer.ENGLISH_STOP_WORDS_SET; this.matchVersion = matchVersion; this.configuration = configuration; }
public void Configure <T>(IIndexConfiguration <T> configuration) where T : Entity { var analysisConfiguration = (configuration as IIndexAnalysisConfiguration <T>); var mappingConfiguration = (configuration as IIndexMappingsConfiguration <T>); _esConfiguration.DefaultMappingFor <T>(mappings => mappings.IndexName(configuration.IndexName)); _elasticClient.Indices.Create(configuration.IndexName, (id) => id.Settings(sd => sd.Analysis(ad => analysisConfiguration?.ConfigureAnalysis(ad) ?? ad)).Map <T>( md => md.Properties(pd => mappingConfiguration?.ConfigureMapping(pd) ?? pd) ) ); }
public LuceneStorageIndex(IIndexConfiguration configuration = null, IIndexStorage storage = null, IServiceFactory factory = null, Analyzer analyzer = null) { //TODO: Version should come from outside Version = Version.LUCENE_30; Factory = factory ?? new DefaultServiceFactory(); Schemas = Factory.CreateSchemaCollection(this); writer = new Lazy <ILuceneWriter>(() => new LuceneWriter(this, Factory.CreateDocumentFactory(this))); searcher = new Lazy <ILuceneSearcher>(() => Factory.CreateSearcher(this)); Analyzer = analyzer ?? new DotJemAnalyzer(Version.LUCENE_30, configuration); Storage = storage ?? new LuceneMemmoryIndexStorage(); Configuration = configuration ?? new IndexConfiguration(); }
public DocumentBuilderContext(IIndexConfiguration configuration, string contentType, JObject json) : this(configuration, null, contentType, json, string.Empty) { }
public SpatialSearchToLinqService(IIndexConfiguration indexingConfiguration, IDistanceCalculatorService distanceCalculator) { this._indexingConfiguration = indexingConfiguration; _distanceCalculator = distanceCalculator; }
public TranscodePaletteConfiguration(IIndexConfiguration parent) { _parent = parent; }