当前位置:网站首页>Solr基础操作9
Solr基础操作9
2022-06-29 23:56:00 【franket】
属性匹配
q=field:value 可以进行更精细的属性限定
比如只搜索 _version_ 为 1511824568810995712 的文档
[[email protected] solr-5.3.0]# curl "http://localhost:8983/solr/gettingstarted/select?wt=json&indent=true&q=_version_:1511824568810995712"
{
"responseHeader":{
"status":0,
"QTime":18,
"params":{
"indent":"true",
"q":"_version_:1511824568810995712",
"wt":"json"}},
"response":{"numFound":1,"start":0,"maxScore":7.851185,"docs":[
{
"id":"/data/solr/solr-5.3.0/docs/solr-morphlines-cell/allclasses-noframe.html",
"title":["All Classes (Solr 5.3.0 API)"],
"stream_content_type":["text/html"],
"stream_size":[1059],
"content_encoding":["UTF-8"],
"date":["2015-08-17T00:00:00Z"],
"x_parsed_by":["org.apache.tika.parser.DefaultParser",
"org.apache.tika.parser.html.HtmlParser"],
"content_type":["text/html; charset=utf-8"],
"resourcename":["/data/solr/solr-5.3.0/docs/solr-morphlines-cell/allclasses-noframe.html"],
"dc_title":["All Classes (Solr 5.3.0 API)"],
"_version_":1511824568810995712}]
}}
[[email protected] solr-5.3.0]# 多关键字匹配(或)
如果要进行多关键字搜索,就使用 + ,例如: q=ui+test 或 q=’ui+test’
[[email protected] solr-5.3.0]# curl "http://localhost:8983/solr/gettingstarted/select?wt=json&indent=true&fl=id&rows=3&q=test"
{
"responseHeader":{
"status":0,
"QTime":13,
"params":{
"fl":"id",
"indent":"true",
"q":"test",
"wt":"json",
"rows":"3"}},
"response":{"numFound":204,"start":0,"maxScore":0.48749265,"docs":[
{
"id":"/data/solr/solr-5.3.0/docs/solr-test-framework/overview-summary.html"},
{
"id":"/data/solr/solr-5.3.0/docs/solr-test-framework/org/apache/solr/analysis/package-frame.html"},
{
"id":"/data/solr/solr-5.3.0/docs/solr-test-framework/org/apache/solr/core/package-frame.html"}]
}}
[[email protected] solr-5.3.0]# curl "http://localhost:8983/solr/gettingstarted/select?wt=json&indent=true&fl=id&rows=3&q=ui"
{
"responseHeader":{
"status":0,
"QTime":8,
"params":{
"fl":"id",
"indent":"true",
"q":"ui",
"wt":"json",
"rows":"3"}},
"response":{"numFound":31,"start":0,"maxScore":0.3156422,"docs":[
{
"id":"/data/solr/solr-5.3.0/docs/solr-core/org/apache/solr/servlet/package-summary.html"},
{
"id":"/data/solr/solr-5.3.0/docs/solr-core/org/apache/solr/handler/admin/package-summary.html"},
{
"id":"/data/solr/solr-5.3.0/docs/solr-core/org/apache/solr/core/package-use.html"}]
}}
[[email protected] solr-5.3.0]# curl "http://localhost:8983/solr/gettingstarted/select?wt=json&indent=true&fl=id&rows=3&q=ui+test"
{
"responseHeader":{
"status":0,
"QTime":13,
"params":{
"fl":"id",
"indent":"true",
"q":"ui test",
"wt":"json",
"rows":"3"}},
"response":{"numFound":234,"start":0,"maxScore":0.17063226,"docs":[
{
"id":"/data/solr/solr-5.3.0/docs/changes/Changes.html"},
{
"id":"/data/solr/solr-5.3.0/docs/solr-test-framework/overview-summary.html"},
{
"id":"/data/solr/solr-5.3.0/docs/solr-test-framework/org/apache/solr/analysis/package-frame.html"}]
}}
[[email protected] solr-5.3.0]# Tip: 同时匹配多个关键字的结果会排到更前列
边栏推荐
- Virtual machine online migration based on openstack
- How about counting Berry Pie 4? What are the possible ways to play?
- Yunhe enmo, gaiguoqiang, identify it and grasp it before the domestic database boils
- 500 error occurred after importing skins folder into solo blog skin
- 6.29日刷题题解
- FPGA Development (2) -- IIC communication
- 6.28日刷题题解
- 云和恩墨盖国强,识别它、抓住它,在国产数据库沸腾以前
- JVM之栈空间
- 數莓派 4怎麼樣?可能的玩法有哪些?
猜你喜欢
![多数元素II[求众数类之摩尔投票法]](/img/8f/5925f97c0f5f8c50c19a9ef6d7723c.png)
多数元素II[求众数类之摩尔投票法]

QPainter的使用入门:绘制象棋界面

Unity splashimage scaling problem

这个简单的小功能,半年为我们产研团队省下213个小时

西门子低代码 9.14版本: 满足不同需求

Create an API rapid development platform, awesome!

架构实战营模块5作业

Why is JSX syntax so popular?

视频ToneMapping(HDR转SDR)中的颜色空间转换问题(BT2020转BT709,YCbCr、YUV和RGB)

Exploration and Practice on the future direction of byte cloud database
随机推荐
数莓派 4怎么样?可能的玩法有哪些?
Matlab exercises -- program control process exercise
Viewing splitchunks code segmentation from MPX resource construction optimization
我想知道今天还可以开户么?另外想问,现在在线开户安全么?
DOM 知识点总结
solo 博客皮肤导入 skins 文件夹后出现 500 错误
After working in the software development industry for six years, I changed my ideas in those years
AI empowers new retail, the way to win "wisdom" lies in ecological thinking | selected excerpts from digital intelligence night talk live broadcast
Binary search tree 230 The element with the smallest K in the binary search tree 1038 From binary search tree to larger sum tree
Andorid source build/envsetup.sh 该知道的细节
LC: effective Sudoku + rotating image
ThinkPad VMware installation virtual machine: this host supports Intel VT-x, but Intel VT-x is disabled (problem resolution)
Gradle连载7-配置签名
Matplotlib plt Hist() parameter explanation
Leetcode (76) -- Minimum Covering substring
Gradle serialization 7- configuration signature
Digital collection of cultural relics, opening a new way of cultural inheritance
Head on Amway! Good looking and practical motor SolidWorks model material see here
About mongodb error: connecting to: mongodb://127.0.0.1:27017/?compressors=disabled &gssapiServiceName=mongodb
Solr basic operation 1