use of com.celements.search.lucene.query.QueryRestriction in project celements-blog by celements.
the class ArticleLuceneQueryBuilder method getBlogSearchTermRestriction.
IQueryRestriction getBlogSearchTermRestriction(ArticleLoadParameter param) throws XWikiException {
QueryRestrictionGroup restr = null;
if (param.isWithBlogArticles() && (param.getSearchTerm() != null)) {
restr = searchService.createRestrictionGroup(Type.OR);
restr.add(new QueryRestriction("XWiki.ArticleClass.extract", param.getSearchTerm()));
restr.add(new QueryRestriction("XWiki.ArticleClass.title", param.getSearchTerm()));
restr.add(new QueryRestriction("XWiki.ArticleClass.content", param.getSearchTerm()));
}
LOGGER.trace("got blog restriction " + restr + "' for '" + param + "'");
return restr;
}
Aggregations