搜索引擎概述
- • 搜索引擎的定义与作用
- • 搜索引擎的基本组成
- • 搜索引擎的工作流程
Elasticsearch示例
# 创建索引
PUT /my_index
{
"mappings": {
"properties": {
"title": { "type": "text" },
"content": { "type": "text" }
}
}
}
# 搜索文档
GET /my_index/_search
{
"query": {
"match": {
"content": "搜索关键词"
}
}
}