private IEnumerable <DomainObject <int> > GetComments(String text)
        {
            Exp commentsWhere;

            List <int> commentIds;

            if (FactoryIndexer <CommentsWrapper> .TrySelectIds(s => s.MatchAll(text).Where(r => r.InActive, false), out commentIds))
            {
                commentsWhere = Exp.In("comment_id", commentIds);
            }
            else
            {
                commentsWhere = BuildLike(new[] { "content" }, text);
            }

            return(CommentDao.GetComments(commentsWhere));
        }
Esempio n. 2
0
        private IEnumerable <DomainObject <int> > GetComments(String text)
        {
            Exp commentsWhere;

            if (FullTextSearch.SupportModule(FullTextSearch.ProjectsCommentsModule))
            {
                var commentIds = FullTextSearch.Search(FullTextSearch.ProjectsCommentsModule.Match(text));

                commentsWhere = Exp.In("comment_id", commentIds);
            }
            else
            {
                commentsWhere = BuildLike(new[] { "content" }, text);
            }

            return(CommentDao.GetComments(commentsWhere));
        }