Solr
查询
*
:
*
查询所有文档
查询结果:
<?xml version="1.0" encoding="UTF-8"?
<response>
<lst name="responseHeader"> response基本信息
<int name="status">0</int> 0表示成功
<int name="QTime">2</int> 运行时间
<lst name="params"> 查询参数
<str name="explainOther"/>
<str name="fl">*</str>
<str name="indent">on</str>
<str name="start">0</str>
<str name="q">solr
</str>
<str name="hl.fl"/>
<str name="qt">standard</str
<str name="wt">standard</str>
<str name="fq"/>
<str name="hl">on</str>
<str name="rows">10</str>
<str name="version">2.2</str>
</lst>
</lst>
<result name="response" numFound="2" start="0" rows=”10”> 查询结果 numFound:匹配查询文档总数 start,row是分页
<doc>
<str name="author">chester</str>
<str name="content">oaded into Solr. </str>
<date name="last_modified">2011-08-01T16:30:25Z</date>
<str name="source">website</str>
<str name="tags">smg,ugc,solr</str>
<str name="title">
中国持有“两房”债券并非高枕无忧
</str>
<str name="url">http://www.yicai.com/news/2011/02/346584.html</str>
</doc>
<doc>...
</doc>
</result>
<lst name="highlighting">
<lst name="http://www.yicai.com/news/2011/02/346584.html"/>
<lst name="http://www.yicai.com/news/2011/02/929943.html"/>
</lst>
</response>
URL
详细介绍
:
http://localhost:8983/solr/select?indent=on&version=2.2&q=solr%0%0A&fq=&start=0&rows=10&fl=*&qt=standard&wt=standard&explainOther=&hl=on&hl.fl
=
/sor
web application name
/search
调用
RequestSearch
Handle
,
在
solrconfig.xml
配置
q
查询参赛
q.op
OR /and,
应用于
df
df
默认查询字段
用逗号隔开
defType?
Fq?
qt?
fl
返回字段
用逗号隔开
sort
排序
逗号隔开
title
desc, author asc
wt
返回格式
standard/xml/json/javabin/python/php/...
indent
返回结果缩进
,
浏览器查看源码可以看到效果
debugQuery
显示调试结果
echoHandler
显示
handler
类名
echoParam
显示参赛信息
查询表达式
+abc
强制
-abc
禁用
abc
可选
布而表达式
OR
AND NOT
子表达式
+(express)
(express)
字段过滤
title:abc
+author:jack
句子查询
“hello
world”
通配符
abc*
abc*def
abc??*
?
代表两格字符
*
不能开头
模糊查询
abc~
范围查询
(
字段为可排序的,
如
int
float data
)
date:[2011-02-44T00:00:00
TO 2011-02-44T00:00:00]
drution:[3000
TO *]
data:[*
TO NOW-2YEAR]
两年以前
date:[*
To NOW/DAY -2YEAR]
两年前的今天之前
精度可用
YEAR/MONTH/DAY/DATE/HOUR/MINUTE/SECOND/MILISECOND/MILI
title:[*
TO *]
查询打分
title:
abc^2 OR def
过滤语法里的特殊字符
+
- && [] {} ! () ^ “ ~ * ? : \
1.
abc\:123 who\?
2.
“abc:123” “who?”
搜索方式
+green
type:aticle -atype:2 =
q=gren&fq=type:aticle&fq=-atype:2
排序
sort=score+asc,
type+desc
Request
Handler
配置在
solrcof.xml
可以配置两件事
1.
requesthandler
默认参数
设值不可修改
2.
注册 搜索组件
<reqeustHandler
name=”custorm” class=””>
<lst
name=”defaut”>
简单参数,
客户段可以修改
<stranme=””></st>
</lst>
<lst
name=”appends”>
<str
name=”fq'>title:abc</str>
可以设置多次
</lst>
<lst
name=”invariants”>
客户段不能覆盖
<str
name=”facet”>false</str>
</lst>
<lst
name=”first-components, components last-pomponent”>
<str
name=”facet”>false</str>
</lst>
</requestHandler>
分享到:
相关推荐
Apache Solr 4 Cookbook Apache Solr 4 Cookbook Apache Solr 4 Cookbook Apache Solr 4 Cookbook Apache Solr 4 Cookbook
apache solr搜索系统的.Net实现
Spring Data for Apache Solr API。 Spring Data for Apache Solr 开发文档
Apache Solr lucene 搜索模块设计实现 Solr 模块 架构 lucene 搜索
Apache Solr for Indexing Data
从资源下载,到映射数据库建立索引。的过程。
Apache Solr Search
Apache Solr 1.3.0发布,Apache Solr是一个性能强大的,基于 Lucene 的全文搜索的 开源企业级搜索服务器,拥有XML/HTTP,JSON APIs,hit highlighting, faceted search, caching, replication,web管理界面等很多功能...
Apache Solr Essentials is a fast-paced guide to help you quickly learn the process of creating a scalable, efficient, and powerful search application. The book starts off by explaining the ...
apache solr 源文件 版本为3.6.1 让你能够更好地了解solr实现,更好的使用solr
Apache Solr 3 Enterprise Search Server 部分中文翻译 从博客上面保存下来的。是网页版,方便大家查看
apache solr 官方文档(英文原版) 包含详细的安装、Schema配置、solrConfig配置、管理页面使用等.
《apachesolr7官方指南》
Apache Solr(solr-8.11.1.tgz)Binary releases 二进制版本
apache solr guide 4.7
Apache Solr(solr-8.11.1.zip)Binary releases 二进制版本
讲解如何安装Apache 的Solr服务器,以及如何用Solrj的API操作服务器
Solr笔记,Solr笔记,Solr笔记,Solr笔记,Solr笔记,Solr笔记,Solr笔记,Solr笔记,Solr笔记,Solr笔记,