1、^ 控制符

(1)查询串上用^

搜索: 天后王菲,如果希望将王菲的相关度加大,用^控制符。

天后  王菲^10.5  结果就会将含有王菲的document权重加大分数提高,排序靠前,10.5为权重。

(2)feild上用^

name ^ 10

即name含有搜索串时候,权重比content含有搜索串的权重高,分数也就高。

2、*符号

当分词器中是最大切分时候,搜索小单元词汇“海波”,如果分析器都分析为“黄海波”,那么则用  *海波*  能搜索出结果!!

3、OR符号

要想既搜索   【黄海波  视频】 又搜索【黄海波】,搜索串可以写成: "黄海波  视频"  黄海波                 或者      "黄海波  视频"   OR  黄海波

注意:+ - && || ! ( ) { } [ ] ^ " ~ * ? : /     需要用反斜杠实现转义!

4、括号-组搜索

(黄奕  OR 视频) 黄海波 =====》搜索  黄奕 AND 黄海波     视频 AND 黄海波

区间搜索:黄海波  AND last_modified:[2015-03-06T23:59:59.999Z TO *]  时间要大于2015年的。。。。结果

5、dismax中的 mm

当mm不设置的时候:如果设置boolean 查询逻辑为 AND,则mm = 100% 搜索串被切分后的词语必须都出现,如果查询逻辑为OR,则mm=1  出现搜索串切分后的其中一个词语就可以。

mm:值可以使正正数,负整数,正的百分数,负的百分数。正数表示分析器分词后必须出现的个数,负数表示可以不出现词语的个数。

如mm : -2 表示可以有任意2个词语不出现!

6、bq boost query

The  parameter specifies an additional, optional, query clause that will be added to the user's main query to influence the score. For example, if bq

you wanted to add a relevancy boost for recent documents:

bq=date:[NOW/DAY-1YEAR TO NOW/DAY] 给距今一年内的文档的相关度提高。

7、各个配置参数解释:

(1)  qf(query feild):  the  parameter introduces a list of fields, each of which is assigned a boost factor to increase or decrease that particular field's importance in qf

the query. 针对某个feild增加boost权重,提高该feild上的搜索相关度

(2)  mm(Minimum Should Match)  :

mm:值可以使正正数,负整数,正的百分数,负的百分数。正数表示分析器分词后必须出现的个数,负数表示可以不出现词语的个数。

如mm : -2 表示可以有任意2个词语不出现!

(3)  pf(phrase feilds):  Once the list of matching documents has been identified using the  and  parameters, the  parameter can be used to "boost" the score of fq qf pf

documents in cases where all of the terms in the q parameter appear in close proximity.

The format is the same as that used by the  parameter: a list of fields and "boosts" to associate with each of them when making phrase queries qf

out of the entire q parameter用于指定一组field,当query完全匹配pf指定的某一个field时,来进行boost。

(4)  ps(phrase slop ):

(5)  qs(query phrase slop):

(6)  tie(tie breaker):The  parameter specifies a float value (which should be something much less than 1) to use as tiebreaker in DisMax queries. tie

When a term from the user's input is tested against multiple fields, more than one field may match. If so, each field will generate a different score

based on how common that word is in that field (for each document relative to all other documents). The  parameter lets you control how tie

much the final score of the query will be influenced by the scores of the lower scoring fields compared to the highest scoring field.

A value of "0.0" makes the query a pure "disjunction max query": that is, only the maximum scoring subquery contributes to the final score. A

value of "1.0" makes the query a pure "disjunction sum query" where it doesn't matter what the maximum scoring sub query is, because the final

score will be the sum of the subquery scores. Typically a low value, such as 0.1, is useful. 这个参数很少用到

(7) bq(boost query): The  parameter specifies an additional, optional, query clause that will be added to the user's main query to influence the score. For example, if bq

you wanted to add a relevancy boost for recent documents:

q=cheese 

bq=date:[NOW/DAY-1YEAR TO NOW/DAY]

(8)bf(boost function):The  parameter specifies functions (with optional boosts) that will be used to construct FunctionQueries which will be added to the user's main bf

query as optional clauses that will influence the score. Any function supported natively by Solr can be used, along with a boost value.

(9)qt(query type):指定那个类型的request handler来处理查询请求,一般不用指定,默认是standard.(4.1以后默认的standard是 dismax query parser,4.1之前默认的是 standard query parser)

(10)qf(query
fields):指定solr从哪些field中搜索。当在solrconfig中配置了qf,就会和schema中配置的默认搜索域<defaultSearchField>????????</defaultSearchField>都被搜索

(11)pf:phrase query,pf2(Phrase
bigram fields):"the big pig"----"the big"   "big pig"

pf3: (Phrase trigram fields):"the nice big pig"---"the nice big"   "nice big pig"

(12)bf:boost function:   recip(rord(myfield),1,2,3)^1.5;    recip(ms(NOW,mydatefield),3.16e-11,1,1)理解这些公式需要看functionQuery相关内容。

solr search基础知识(控制符及其参数)的更多相关文章

  1. Solr基础知识二(导入数据)

    上一篇讲述了solr的安装启动过程,这一篇讲述如何导入数据到solr里. 一.准备数据 1.1 学生相关表 创建学生表.学生专业关联表.专业表.学生行业关联表.行业表.基础信息表,并创建一条小白的信息 ...

  2. elastic search&logstash&kibana 学习历程(二)es基础知识

    简介:es的index索引,document文档对象,副本,多节点集群等基础知识 1.通俗的解释: 在Elasticsearch中,文档归属于一种类型(type),而这些类型存在于索引(index)中 ...

  3. 无刷电调基础知识以及BLHeli固件烧录和参数调整

    标题: 无刷电调基础知识以及BLHeli固件烧录和参数调整 作者: 梦幻之心星 sky-seeker@qq.com 标签: [#基础知识,#电调,#BLHeli,#固件,#烧录,#调参] 目录: [电 ...

  4. [C/C++基础知识] main函数的参数argc和argv

    该篇文章主要是关于C++\C语言最基础的main函数的参数知识,是学习C++或C语言都必备的知识点.不知道你是否知道该知识?希望对大家有所帮助.一.main()函数参数通常我们在写主函数时都是void ...

  5. HTML基础知识总结

    经过这段时间的学习,对于html的一些基础知识有了一定的了解.所谓好记性不如烂笔头,唯有一点点累积,才能汇聚成知识的海洋.现在,我对这段时间的学习做一个总结. 一.HTML的定义 HTML,超文本标记 ...

  6. (转)JAVA AJAX教程第二章-JAVASCRIPT基础知识

    开篇:JAVASCRIPT是AJAX技术中不可或缺的一部分,所以想学好AJAX以及现在流行的AJAX框架,学好JAVASCRIPT是最重要的.这章我给大家整理了一些JAVASCRIPT的基础知识.常用 ...

  7. [C# 基础知识梳理系列]专题六:泛型基础篇——为什么引入泛型

    引言: 前面专题主要介绍了C#1中的2个核心特性——委托和事件,然而在C# 2.0中又引入一个很重要的特性,它就是泛型,大家在平常的操作中肯定会经常碰到并使用它,如果你对于它的一些相关特性还不是很了解 ...

  8. css+js+html基础知识总结

    css+js+html基础知识总结 一.CSS相关 1.css的盒子模型:IE盒子模型.标准W3C盒子模型: 2.CSS优先级机制: 选择器的优先权:!important>style(内联样式) ...

  9. JVM菜鸟进阶高手之路十(基础知识开场白)

    转载请注明原创出处,谢谢! 最近没有什么实战,准备把JVM知识梳理一遍,先以开发人员的交流来谈谈jvm这块的知识以及重要性,依稀记得2.3年前用solr的时候老是经常oom,提到oom大家应该都不陌生 ...

随机推荐

  1. 打包的时候遇上找不到dll文件错误

    1.保证dll文件和EXE文件处于同级目录下 我是在EXE同级文件目录下建立了一个Plugins文件并把dll文件夹放在这里面 2.但是因为建立的目录是x86_64,所以如果打包成windows平台选 ...

  2. 手动下载 Xcode 文档

    下载Xcode文档的方法有两个: 1. 自动下载:到在Xcode的Preserences中Downloads页面的Documentation,点击对应文档的下载. 2. 手动下载:到这个页面:http ...

  3. sql生成excel

    gosp_configure 'show advanced options',1reconfiguregosp_configure 'xp_cmdshell',1reconfiguregoEXEC m ...

  4. 初学者的Node.js学习历程

    废话篇: 对于我这个新手的不能再白菜的人来说,nodejs的大名都有耳闻,所以说他是一项不可不克服的技能也是可以说的.但是之前没有搞清楚的情况之下胡乱的猜测,是的我对node.js没有一个具体的概念的 ...

  5. oralce 索引(2)

    B-Tree 索引 本文来自网上整理 来自以下博客内容 http://www.360doc.com/content/13/0712/11/13136648_299364992.shtml; http: ...

  6. 【.Net】Byte,Stream,File的转换

    引言      文件的传输和读写通常都离不开Byte,Stream,File这个类,这里我简单封装一下,方便使用. 帮助类     public static class FileHelper { / ...

  7. MySQL 约束和数据库设计

    1.MySQL 约束: 1.约束的概念: 约束是一种限制,它通过对表的行或列的数据做出限制,来确保表的数据的完整性.唯一性. MySQL中,常用的几种约束: 约束类型: 非空 主键 唯一 外键 默认值 ...

  8. 31 python下实现并发编程

    一 背景知识 顾名思义,进程即正在执行的一个过程.进程是对正在运行程序的一个抽象. 进程的概念起源于操作系统,是操作系统最核心的概念,也是操作系统提供的最古老也是最重要的抽象概念之一.操作系统的其他所 ...

  9. Agc001_D Arrays and Palindrome

    传送门 题目大意 给定一个元素和为$N$的有$M$个数的序列$A$,请你可以$A$元素排列的顺序,并需要构造一个有$K$个($K$可以自己定)数的数列,使得任意一个长度为$N$的字符串,若满足:前$A ...

  10. boost_1.61.0编译安装

    1.下载源码boost_1_61_0.zip 2.进入目录 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shor ...