位置:- 正文

织梦搜索实现全文检索模糊搜索的方法(织梦怎么调用当前栏目下的文章)

编辑:rootadmin

推荐整理分享织梦搜索实现全文检索模糊搜索的方法(织梦怎么调用当前栏目下的文章),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:织梦怎么自动采集发布,织梦系统,织梦设置的关键词看不到,织梦使用教程,织梦使用教程,织梦如何采集文章,织梦使用教程,织梦使用教程,内容如对您有帮助,希望把文章链接给更多的朋友!

织梦Dedecms默认的模糊搜索只能根据网站文章的名称进行搜索,无法搜索到文章内部信息,下面讲一下如何让Dedecms自带搜索实现全文检索:

  1、后台-->核心-->频道模型-->内容模型管理 -->普通文章-->点击后面那个放大镜标志(最重要一步)-->附件表可供自定义搜索的字段,这里的字段是程序依据字段类型自动选择 生成的,将“文章内容”前面那个打勾,此时将修改掉搜索字段,但是还没有成功,还需要修改模板相应的代码。

织梦搜索实现全文检索模糊搜索的方法(织梦怎么调用当前栏目下的文章)

  

2、将模板文件 head.htm 中的以下代码:

  

<form action="{dede:field name='phpurl'/}/search.php" name="formsearch">  <div class="form">  <h4>搜索</h4>  <input type="hidden" name="kwtype" value="0" />  <input name="keyword" type="text" class="search-keyword" id="search-keyword" />  <select name="searchtype" class="search-option" id="search-option">  <option value="titlekeyword" selected='1'>智能模糊搜索</option>  <option value="title">仅搜索标题</option>  </select>  <button type="submit" class="search-submit">搜索</button>  </div>  </form>  修改为<form action="/plus/advancedsearch.php" method="post">  <div class="form">  <h4>搜索</h4>  <input type="hidden" name="mid" value="1" />  <input type="hidden" name="dopost" value="search" />  关键词:<input type="text" name="q" /> <input type="submit" name="submit" value="开始全文搜索" /></div>  </form>

免责

本文链接地址:https://www.jiuchutong.com/zhishi/313149.html 转载请保留说明!
下一篇链接:https://www.jiuchutong.com/zhishi/313150.html
免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络