Authored by all4you

update

... ... @@ -16,6 +16,12 @@ public class ContentRequest extends BaseBean{
*/
private Integer cid;
/**
* 文章类型
* 1:男生
* 2:女生
*/
private Integer app;
/**
* 逗号分隔的tagId
*/
private String tagIds;
... ... @@ -48,6 +54,14 @@ public class ContentRequest extends BaseBean{
this.cid = cid;
}
public Integer getApp() {
return app;
}
public void setApp(Integer app) {
this.app = app;
}
public String getTagIds() {
return tagIds;
}
... ...
... ... @@ -44,6 +44,7 @@ public class ContentService extends BaseService {
boolQuery.should(QueryBuilders.termQuery(ISearchConstans.CONTENT_TAG_IDS, tagId));
}
boolQuery.mustNot(QueryBuilders.termQuery(ISearchConstans.CONTENT_CID, request.getCid()));
boolQuery.must(QueryBuilders.termQuery(ISearchConstans.CONTENT_APP, request.getApp()));
// 构造query
searchParam.setQuery(boolQuery);
return searchCommonService.doSearch(CONTENT_INDEX_NAME, searchParam);
... ...