示例#1
0
        public JobAdSearchService(ResourceLoader resourceLoader, IJobAdSearchBooster booster, IJobAdSearchEngineQuery searchEngineQuery, IJobAdsQuery jobAdsQuery, IEmployersQuery employersQuery, IMembersQuery membersQuery, IResumesQuery resumesQuery, ICandidatesQuery candidatesQuery, ILocationQuery locationQuery, IIndustriesQuery industriesQuery, IJobAdActivityFiltersQuery jobAdActivityFiltersQuery, IJobAdFlagListsQuery jobAdFlagListsQuery, IMemberApplicationsQuery memberApplicationsQuery)
            : base(EventSource, searchEngineQuery, DefaultIndexFolder)
        {
            _jobAdsQuery               = jobAdsQuery;
            _employersQuery            = employersQuery;
            _membersQuery              = membersQuery;
            _resumesQuery              = resumesQuery;
            _candidatesQuery           = candidatesQuery;
            _memberApplicationsQuery   = memberApplicationsQuery;
            _jobAdActivityFiltersQuery = jobAdActivityFiltersQuery;

            var analyzerFactory = new AnalyzerFactory(resourceLoader);

            _contentAnalyzer   = analyzerFactory.CreateContentAnalyzer();
            _indexer           = new Indexer(_contentAnalyzer, analyzerFactory.CreateQueryAnalyzer(), booster, locationQuery, industriesQuery, jobAdFlagListsQuery);
            _spellCheckHandler = new SpellCheckHandler(analyzerFactory.CreateSpellingAnalyzer(), FieldName.ContentExact);
        }