惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy International News Feed
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
Google Online Security Blog
Google Online Security Blog
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
云风的 BLOG
云风的 BLOG
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Announcements
Recent Announcements
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LangChain Blog
The GitHub Blog
The GitHub Blog
aimingoo的专栏
aimingoo的专栏
Scott Helme
Scott Helme
腾讯CDC
T
Threat Research - Cisco Blogs
P
Palo Alto Networks Blog
Cloudbric
Cloudbric
K
Kaspersky official blog
B
Blog RSS Feed
博客园_首页
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
G
Google Developers Blog
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
Vercel News
Vercel News
The Last Watchdog
The Last Watchdog
S
Schneier on Security
T
Tor Project blog
雷峰网
雷峰网
博客园 - 司徒正美
H
Hacker News: Front Page
I
Intezer
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Martin Fowler
Martin Fowler
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Help Net Security
Help Net Security
WordPress大学
WordPress大学
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
V
Vulnerabilities – Threatpost
Forbes - Security
Forbes - Security
Google DeepMind News
Google DeepMind News
T
Threatpost

博客园 - 飞翔的天空

sp.net core部署到iis中出现 HTTP Error 502.5 - Process Failure 的解决办法 aspnet zero Swagger 不出现Authorize按钮的解决办法 Js获取当前日期时间及其它操作 js阿拉伯数字转中文大写 php学习点滴 excel合并单元格内容 EXCEL公式以指定分隔符从右往左截取字符 drupal学习FAQ drupal模块简介 js中三目运算及readonly的解决办法 Zxing中文乱码的简单解决办法 easyUI MVC3一些注意的东东(4) orchard模块编写的错误及其解决办法 orchard文档之-orchard工作原理 orchard文档之-更新站点到新的orchard版本 orchard文档之-创建自定义表单 准备把orchard的自己认为重要的文档翻译一遍 orchard文档之-理解内容处理器 orchard文档之-理解数据访问
orchard文档之-搜索和索引
飞翔的天空 · 2013-06-05 · via 博客园 - 飞翔的天空

搜索和索引

Orchard提供了在应用程序中索引和搜索内容项的能力。可以启用Indexing特征来提供索引功能, ,同时也指定了具体的索引实现(默认是包含了基于Lucesne的实现). 除了 IndexingSearch 的特性提供了查询索引的功能,(通过关键字或者使用 Lucene 的查询语法) ,在前台返回与查询匹配的内容项。

在启用这些特性前,你先要从 Gallery 中安装.选择 Modules 下的Gallery 页,安装以下的特性: Search, Indexing, 和 Lucene.

由于搜索依赖索引,启用搜索也就自动启用了索引.注意你必须在启用搜索和索引之前启用 Lucene,搜索和索引才能工作.

当启用索引特性时,在仪表栏Configuration 项下会出现Search Index 项 .索引功能会在后台执行,默认是每一分钟一次,你可以从屏幕中更新或重置索引。 索引首页页面也显示了索引的页面数和哪些字段被索引了。

当启用搜索特性时,在导航栏的 Settings屏幕会显示哪些字段会被查询,也可以包含其他的字段来更新列表。默认Body Title 字段是索引的。

站点的前端此时还没有搜索界面.为了添加搜索界面,你需要添加一个部件。在管理界面按下 Widgets 按钮,在 default layer选中的情况下,点击 在可用的部件中Add to zone 然后 SearchForm .

保证 "Header" 区域被选中,而且 "Default" 是默认层,这样搜索部件才会出现在每一个页面中。 (default 层应用与站点的所有页面).

指定标题为 "Search" 然后选择保存。

For more information about widgets, see Managing widgets.

如果你定向到站点的其它,你会看到出现表单。

当你在输入框在输入关键字或查询项目,匹配的内容会出现在结果中。