Build() public method

public Build ( QueryData data, DocumentIndexTypeToken projectContextType, DocumentIndexTypeToken squadContextType, DocumentIndexTypeToken entityType ) : Maybe
data Tp.Search.Bus.Data.QueryData
projectContextType DocumentIndexTypeToken
squadContextType DocumentIndexTypeToken
entityType DocumentIndexTypeToken
return Maybe
        private Maybe <QueryPlan> CreateCommentPlan(QueryData data, ParsedQuery parsedQuery)
        {
            if (!data.ShouldSearchComment)
            {
                return(Maybe.Nothing);
            }
            var contextPlan = _contextQueryPlanBuilder.Build(data, DocumentIndexTypeToken.CommentProject, DocumentIndexTypeToken.CommentSquad, DocumentIndexTypeToken.CommentEntityType);

            if (!contextPlan.HasValue)
            {
                return(Maybe.Nothing);
            }
            var commentIndex = _documentIndexProvider.GetOrCreateDocumentIndex(_pluginContext, DocumentIndexTypeToken.Comment);
            var plan         = commentIndex.BuildExecutionPlan(parsedQuery, _profile.Initialized);

            return(And(plan, contextPlan));
        }
        private Maybe <Lazy <WAHBitArray> > CreateCommentPlan(QueryData data, string query)
        {
            if (!data.ShouldSearchComment)
            {
                return(Maybe.Nothing);
            }
            var contextPlan = _contextQueryPlanBuilder.Build(data, DocumentIndexTypeToken.CommentProject, DocumentIndexTypeToken.CommentSquad, DocumentIndexTypeToken.CommentEntityType);

            if (!contextPlan.HasValue)
            {
                return(Maybe.Nothing);
            }
            var commentIndex = _documentIndexProvider.GetOrCreateDocumentIndex(_accountName, DocumentIndexTypeToken.Comment);
            var plan         = commentIndex.BuildExecutionPlan(query, _profile.Initialized);

            return(And(plan, contextPlan));
        }