主题 : jeecms 查询的关键词是什么 |
级别: 论坛管理员
![]() |
5# 发表于:2019-03-25 11:22:42 IP:117.93.*.*
您好 关键词就是您查询的信息 比如我在前台试用中国这个关键词进行查询 那么会查出您网站内所有标题和内容内有这个文字的文章
|
||
---|---|---|---|
级别: 举人
![]() |
8# 发表于:2019-03-25 11:27:40 IP:117.150.*.*
回复第7楼 就是改成搜内容的其他字段,在源码也没看见是怎么查询的
@RequestMapping(value = "/search*.jspx", method = RequestMethod.GET) public String index(HttpServletRequest request, HttpServletResponse response, ModelMap model) { CmsSite site = CmsUtils.getSite(request); // 将request中所有参数保存至model中。 model.putAll(RequestUtils.getQueryParams(request)); FrontUtils.frontData(request, model, site); FrontUtils.frontPageData(request, model); String q = RequestUtils.getQueryParam(request, "q"); String channelId = RequestUtils.getQueryParam(request, "channelId"); if (StringUtils.isBlank(q) && StringUtils.isBlank(channelId)) { return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_SPECIAL, SEARCH_INPUT); } else { String parseQ=parseKeywords(q); model.addAttribute("input",q); model.addAttribute("q",parseQ); searchWordsCache.cacheWord(q); return FrontUtils.getTplPath(request, site.getSolutionPath(), TPLDIR_SPECIAL, SEARCH_RESULT); } } |
||
---|---|---|---|
级别: 论坛管理员
![]() |
9# 发表于:2019-03-25 11:29:59 IP:117.93.*.*
您好 这个可能就需要您那边二次开发来完成了 我们目前是没有这个功能的
|
||
---|---|---|---|