当前位置: 首页 > news >正文

河北明迈特的网站在哪里做的郑州网络推广方案

河北明迈特的网站在哪里做的,郑州网络推广方案,o2o平台有哪些网站,策划案需要给做网站吗目录 一、Solr 安装与配置 1.1 下载与安装 1.2 启动与停止 二、Core 和 Collection 管理 2.1 创建与删除 2.2 核心操作 三、索引管理 3.1 添加与删除文档 3.2 批量操作 3.3 提交与优化 四、查询与检索 4.1 基本查询 4.2 高级查询 五、Schema 管理 5.1 字段管理 …

目录

一、Solr 安装与配置

1.1 下载与安装

1.2 启动与停止

二、Core 和 Collection 管理

2.1 创建与删除

2.2 核心操作

三、索引管理

3.1 添加与删除文档

3.2 批量操作

3.3 提交与优化

四、查询与检索

4.1 基本查询

4.2 高级查询

五、Schema 管理

5.1 字段管理

5.2 字段类型管理

六、备份与恢复

6.1 创建备份

6.2 恢复备份


Apache Solr 是一个强大的开源搜索平台,广泛应用于各种搜索和数据分析应用中。本文将介绍 Solr 中最常用的命令,涵盖安装与配置、Core 和 Collection 管理、索引管理、查询与检索、Schema 管理、以及备份与恢复等方面。

一、Solr 安装与配置

1.1 下载与安装

1.1.1 下载 Solr
从 Solr 官方网站 下载最新版本。

1.1.2 安装 Solr

tar xzf solr-8.8.2.tgz
cd solr-8.8.2
1.2 启动与停止

1.2.1 启动 Solr

bin/solr start

1.2.2 停止 Solr

bin/solr stop

1.2.3 启动特定端口上的 Solr

bin/solr start -p 8983

1.2.4 查看 Solr 运行状态

bin/solr status

二、Core 和 Collection 管理

2.1 创建与删除

2.1.1 创建新的 Core

bin/solr create -c mycore

2.1.2 删除 Core

bin/solr delete -c mycore

2.1.3 创建新的 Collection

bin/solr create -c mycollection -n data_driven_schema_configs

2.1.4 删除 Collection

bin/solr delete -c mycollection
2.2 核心操作

2.2.1 重载 Core

bin/solr reload -c mycore

2.2.2 重命名 Core

bin/solr rename -c oldname -newname newname

2.2.3 查看所有 Cores

bin/solr cores

三、索引管理

3.1 添加与删除文档

3.1.1 添加单个文档

curl http://localhost:8983/solr/mycore/update?commit=true -d '{"id":"1", "title":"Solr Guide"}'

3.1.2 删除单个文档

curl http://localhost:8983/solr/mycore/update?commit=true -d '{"delete":{"id":"1"}}'控制台删除文档
<delete><query>ID:551712</query></delete>

3.1.3 删除符合条件的文档

curl http://localhost:8983/solr/mycore/update?commit=true -d '{"delete":{"query":"title:Solr Guide"}}'
3.2 批量操作

3.2.1 批量添加文档

curl http://localhost:8983/solr/mycore/update?commit=true --data-binary @documents.json -H 'Content-type:application/json'

3.2.2 批量删除文档

curl http://localhost:8983/solr/mycore/update?commit=true -d @delete_query.json -H 'Content-type:application/json'
3.3 提交与优化

3.3.1 提交更改

curl http://localhost:8983/solr/mycore/update?commit=true

3.3.2 优化索引

curl http://localhost:8983/solr/mycore/update?optimize=true

四、查询与检索

4.1 基本查询

4.1.1 简单查询

curl http://localhost:8983/solr/mycore/select?q=title:Solr

4.1.2 分页查询

curl http://localhost:8983/solr/mycore/select?q=title:Solr&start=0&rows=10

4.1.3 排序查询

curl http://localhost:8983/solr/mycore/select?q=title:Solr&sort=id asc
4.2 高级查询

4.2.1 过滤查询

curl http://localhost:8983/solr/mycore/select?q=title:Solr&fq=author:John

4.2.2 字段查询

curl http://localhost:8983/solr/mycore/select?q=title:Solr&fl=id,title

4.2.3 范围查询

curl http://localhost:8983/solr/mycore/select?q=price:[10 TO 50]

五、Schema 管理

5.1 字段管理

5.1.1 添加新字段

curl -X POST -H 'Content-type:application/json' --data-binary '{"add-field":{"name":"newfield","type":"string","stored":true }}' http://localhost:8983/solr/mycore/schema

5.1.2 删除字段

curl -X POST -H 'Content-type:application/json' --data-binary '{"delete-field":{"name":"newfield"}}' http://localhost:8983/solr/mycore/schema
5.2 字段类型管理

5.2.1 添加字段类型

curl -X POST -H 'Content-type:application/json' --data-binary '{"add-field-type":{"name":"newtype","class":"solr.TextField","analyzer":{"tokenizer":{"class":"solr.StandardTokenizerFactory"}}}}' http://localhost:8983/solr/mycore/schema

5.2.2 删除字段类型

curl -X POST -H 'Content-type:application/json' --data-binary '{"delete-field-type":{"name":"newtype"}}' http://localhost:8983/solr/mycore/schema

六、备份与恢复

6.1 创建备份

6.1.1 创建快照

curl http://localhost:8983/solr/admin/cores?action=BACKUP&core=mycore&location=/path/to/backup/dir

6.1.2 创建 Collection 备份

bin/solr create_collection_backup -c mycollection -d /path/to/backup/dir
6.2 恢复备份

6.2.1 恢复快照

curl http://localhost:8983/solr/admin/cores?action=RESTORE&core=mycore&location=/path/to/backup/dir

6.2.2 恢复 Collection 备份

bin/solr restore_collection_backup -c mycollection -d /path/to/backup/dir

通过上述命令,您可以有效地管理和操作 Solr,确保搜索平台的高效运行和数据的完整性。

http://www.hkea.cn/news/413385/

相关文章:

  • 做静态网站选用什么服务器站长素材网站
  • 网站建设先做前台还是后台百度认证是什么
  • 广州专业做crm系统的供应商seo网站培训班
  • 景安建网站企业网站seo方案案例
  • 山东滕州疫情最新消息今天i长沙官网seo
  • 公司做网站买域名之后做什么百度一下你就知道手机版
  • 北京婚恋网站哪家最好企业推广宣传方式
  • 国发网站建设西安做网站公司
  • 网站推广服务合同简述网络营销的主要方法
  • 信息门户网站是什么成人计算机培训机构哪个最好
  • 网站建设公司 中企动力公司东莞商城网站建设
  • b2c的电子商务网站自己想做个网站怎么做
  • 京东pc网站用什么做的如何注册网站怎么注册
  • 长沙商城网站制作seo线下培训课程
  • web网站开发公司网站制作优化排名
  • 这么做3d网站企业邮箱网页版
  • 瑞安网站建设公司关键词排名网络推广
  • 南京学做网站友情链接检查工具
  • 参考文献网站开发百度重庆营销中心
  • 如何做微信ppt模板下载网站企业网页设计公司
  • 做b2b网站百度点击快速排名
  • 网站怎么做移动图片不显示不出来吗芭嘞seo
  • 旅游网站建设服务器ip域名解析
  • 企业网站建设三个原则百度指数资讯指数是指什么
  • 房地产集团网站建设方案软文文案案例
  • 阜蒙县建设学校网站是什么北京seo编辑
  • 珠海建设局网站十大经典事件营销案例分析
  • 创建网站开发公司互联网推广引流是做什么的
  • 万盛集团网站建设seo网站推广全程实例
  • 做教育的网站需要资质吗网站怎么开发