示例#1
0
        public MemberSearchService(ResourceLoader resourceLoader, IMemberSearchBooster booster, IMemberSearchEngineQuery searchEngineQuery, IMembersQuery membersQuery, ICandidatesQuery candidatesQuery, IResumesQuery resumesQuery, ILocationQuery locationQuery, IIndustriesQuery industriesQuery, IMemberActivityFiltersQuery memberActivityFiltersQuery, ICandidateFlagListsQuery candidateFlagListsQuery)
            : base(EventSource, searchEngineQuery, DefaultIndexFolder)
        {
            _membersQuery               = membersQuery;
            _candidatesQuery            = candidatesQuery;
            _resumesQuery               = resumesQuery;
            _memberActivityFiltersQuery = memberActivityFiltersQuery;

            var analyzerFactory = new AnalyzerFactory(resourceLoader);

            _indexer           = new Indexer(analyzerFactory, booster, locationQuery, industriesQuery, candidateFlagListsQuery);
            _spellCheckHandler = new SpellCheckHandler(analyzerFactory.CreateSpellingAnalyzer(), FieldName.Content_Exact);
        }
示例#2
0
        private Indexer(Analyzer contentAnalyzer, Analyzer queryAnalyzer, IMemberSearchBooster booster, ILocationQuery locationQuery, IIndustriesQuery industriesQuery, ICandidateFlagListsQuery candidateFlagListsQuery)
        {
            _contentAnalyzer = contentAnalyzer;
            _queryAnalyzer   = queryAnalyzer;
            _queryBuilder    = new QueryBuilder(_queryAnalyzer, booster);

            _contentHandler         = new ContentHandler();
            _locationHandler        = new LocationContentHandler(booster, locationQuery);
            _industryHandler        = new IndustryContentHandler(booster, industriesQuery);
            _nameHandler            = new NameContentHandler(contentAnalyzer, booster);
            _desiredJobTypesHandler = new DesiredJobTypesContentHandler(booster);
            _candidateStatusHandler = new CandidateStatusContentHandler(booster);
            _ethnicStatusHandler    = new EthnicStatusContentHandler(booster);
            _visaStatusHandler      = new VisaStatusContentHandler(booster);
            _communityHandler       = new CommunityContentHandler(booster);
            _salaryHandler          = new SalaryContentHandler(booster);
            _lastUpdatedHandler     = new LastUpdatedContentHandler(booster);
            _hasResumeHandler       = new HasResumeContentHandler();
            _isActivatedHandler     = new IsActivatedContentHandler();
            _isContactableHandler   = new IsContactableContentHandler();

            _handlers = new[]
            {
                _desiredJobTypesHandler,
                _candidateStatusHandler,
                _ethnicStatusHandler,
                _visaStatusHandler,
                _industryHandler,
                _communityHandler,
                _salaryHandler,
                _lastUpdatedHandler,
                _locationHandler,
                _hasResumeHandler,
                _isActivatedHandler,
                _isContactableHandler
            };

            _candidateFlagListsQuery = candidateFlagListsQuery;
        }
示例#3
0
 public Indexer(IAnalyzerFactory analyzerFactory, IMemberSearchBooster booster, ILocationQuery locationQuery, IIndustriesQuery industriesQuery, ICandidateFlagListsQuery candidateFlagListsQuery)
     : this(analyzerFactory.CreateContentAnalyzer(), analyzerFactory.CreateQueryAnalyzer(), booster, locationQuery, industriesQuery, candidateFlagListsQuery)
 {
 }
示例#4
0
 public Indexer(IMemberSearchBooster booster, ILocationQuery locationQuery, IIndustriesQuery industriesQuery, ICandidateFlagListsQuery candidateFlagListsQuery)
     : this(new SimpleAnalyzer(), new SimpleAnalyzer(), booster, locationQuery, industriesQuery, candidateFlagListsQuery)
 {
 }
示例#5
0
 public QueryBuilder(Analyzer queryAnalyzer, IMemberSearchBooster booster)
 {
     _queryAnalyzer = queryAnalyzer;
     _booster       = booster;
 }