bleve搜索引擎是支持基于field搜索的
Query String Query
The query language query allows humans to describe complex queries using a simple syntax.
Terms
Plain terms without any other syntax are interpreted as a match query for the term in the default field. The default field is _all
unless overridden in the index mapping.
Example: water
will perform a Match Query for the term water
.
Phrases
Phrase queries can be accomplished by placing the phrase in quotes.
Example: "light beer"
will peform a Match Phrase Query for the phrase light beer
.
Field Scoping
You can qualify the field for these searches by prefixing them with the name of the field separated by a colon.
Example: description:water
will perform a Match Query for the term water
, in the description
field.
Required, Optional, and Exclusion
When your query string includes multiple items, by default these are placed into the SHOULD clause of a Boolean Query.
You can change this by prefixing your items with a +
or ‘-’. * ‘+’ Prefixing with plus places that item in the MUST portion of the boolean query. * ‘-’ Prefixing with a minus places that item in the MUST NOT portion of the boolean query.
Example: +description:water -light beer
will perform a Boolean Query that MUST satisfy the Match Query for the term water
in the description
field, MUST NOT satisfy the Match Query for the term light
in the default field, and SHOULD satisfy the Match Query for the term beer
in the default field. Result documents satisfying the SHOULD clause will score higher than those that do not.
Boosting
You can influence the relative importance of the clauses by suffixing clauses with the ^ operator followed by a number.
Example: description:water name:water^5
will perform Match queries for water
in both the name
and description
fields, but documents having the term in the name
field will score higher.
Numeric Ranges
You can perform numeric ranges by using the >, >=, <, and <= operators, followed by a numeric value.
Example: abv:>10
will perform an Numeric Range Query on the abv
field for values greater than ten.
Date Ranges
You can perform date range searches by using the >, >=, <, and <= operators, followed by a date value in quotes.
Example: created:>"2016-09-21"
will perform an Date Range Query on the created
field for values after September 21, 2016.
Escaping
The following quoted string enumerates the characters which may be escaped:
"+-=&|><!(){}[]^\"~*?:\\/ "
NOTE: this list contains the space character.
In order to escape these characters, they are prefixed with the \ (backslash) character. In all cases, using the escaped version produces the character itself and is not interpreted by the lexer.
Example: my\ name
will be interpreted as a single argument to a match query with the value “my name”.
Example: "contains a\" character"
will be interpreted as a single argument to a phrase query with the value contains a " character
.
bleve搜索引擎是支持基于field搜索的的更多相关文章
- php根据汉字获取拼音(php基于拼音搜索实现原理)
php根据汉字获取拼音(php基于拼音搜索实现原理) 代码一:获取字符串汉字首字母,兼容GBK和UTF-8 <?php function getfirstchar($s0){ //获取单个汉 ...
- delphi不同版本字符串类型的演化(要支持基于firemonkey的app调用,字符串最好使用olevariant类型)
string,DELPHI2009以前的版本string=ansistring,一个字符占一个字节,DELPHI2009及以上版本string=unicodestring,一个字符占二个字节. cha ...
- Python分布式爬虫打造搜索引擎完整版-基于Scrapy、Redis、elasticsearch和django打造一个完整的搜索引擎网站
Python分布式爬虫打造搜索引擎 基于Scrapy.Redis.elasticsearch和django打造一个完整的搜索引擎网站 https://github.com/mtianyan/Artic ...
- 基于Elasticsearch搜索平台设计
背景 随着公司业务的高速发展以及数据爆炸式的增长,当前公司各产线都有关于搜索方面的需求,但是以前的搜索服务系统由于架构与业务上的设计,不能很好的满足各个业务线的期望,主要体现下面三个问题: 不能支持对 ...
- Lucene搜索引擎+HDFS+MR完成垂直搜索
介于上一篇的java实现网络爬虫基础之上,这一篇的思想是将网络收集的数据保存到HDFS和数据库(Mysql)中:然后用MR对HDFS的数据进行索引处理,处理成倒排索引:搜索时先用HDFS建立好的索引来 ...
- 基于搜狗搜索的微信公众号爬虫实现(C#版本)
Author: Hoyho Luo Email: luohaihao@gmail.com Source Url:http://here2say.me/11/ 转载请保留此出处 本文介绍基于搜狗的微信公 ...
- 【沽泡学院07】基于ElasticSearch搜索附近的人
1. 为什么要选择ElasticSearch 1)ElasticSearch 优点: 分布式.实时的.Push replication 完全支持Apache Lucene的接近实时的搜索 处理多租户( ...
- THINKPHP_(8)_修改TP源码,支持基于多层关联的任一字段进行排序
之前博文 前述博文THINKPHP_(1)_修改TP源码,支持对中文字符串按拼音进行排序,其解决的主要问题是,对于查询出的think\collection数据,按指定字段对数据进行排序,从而在页面上进 ...
- C# 嵌入dll 动软代码生成器基础使用 系统缓存全解析 .NET开发中的事务处理大比拼 C#之数据类型学习 【基于EF Core的Code First模式的DotNetCore快速开发框架】完成对DB First代码生成的支持 基于EF Core的Code First模式的DotNetCore快速开发框架 【懒人有道】在asp.net core中实现程序集注入
C# 嵌入dll 在很多时候我们在生成C#exe文件时,如果在工程里调用了dll文件时,那么如果不加以处理的话在生成的exe文件运行时需要连同这个dll一起转移,相比于一个单独干净的exe,这种形 ...
随机推荐
- javascript --- 原型初探七日谈(二)
扩展内建对象: 在javascript中,内建对象的构造函数都是可以通过其原型来进行扩展的.这意味着我们可以做一些事情,例如我们要往数组原型中添加一个新方法,就可以在其所有的数组中使用,下面我们来试试 ...
- CMake使用hellocmake&&make的使用
2016-12-11 20:38:32 已经知道cmake这个东西很长的时间了,一直没有试验过,知道它是一个编译工具,在opencv和Linux下都有makefile的内容.感觉现在对源码的编译有 ...
- NN优化方法对照:梯度下降、随机梯度下降和批量梯度下降
1.前言 这几种方法呢都是在求最优解中常常出现的方法,主要是应用迭代的思想来逼近.在梯度下降算法中.都是环绕下面这个式子展开: 当中在上面的式子中hθ(x)代表.输入为x的时候的其当时θ參数下的输出值 ...
- Git使用笔记01
本文基本的參考文章链接例如以下所看到的: Pro Git(中文版) Git教程 Git使用教程 简单介绍与说明 Git是一个分布式版本号管理系统,是为了更好地管理Linux内核开发而创立的.Git能够 ...
- 自己定义ImageView,实现点击之后算出点击的是身体的哪个部位
近期也是由于项目的原因,所以有机会接触到这边的算法. 此文重点不是怎样实现的思路和原理, 有须要的同事能够借鉴一下 废话不多说,直接上代码: <span style="font-siz ...
- swift学习_xcode6搭建
首先是环境搭建 , 我的是苹果系统 , 我是个穷小子. 8k的电脑离我比較遥远. 自己动手的黑苹果 . 总价1k, 学习够用了即可.期间也学到了非常多东西 . 就是穷人仅仅能发时间去换钱了, 一直在考 ...
- AMD单桥主板上电时序的详细解释
3个待机条件: 1.桥需要得到待机电压:3.3V,1.5V/1.2V2.25M起振注:NV的RTC电路,一般不会导致时序故障,都可以出CPURST#3.PWRGD-SB(即INTEL芯片组的RSMRS ...
- 小贝_mysql主从复制作用以及案例
mysql主从复制 简要: 一.mysql用户授权 二.mysql bin-log日志 三.mysql主从复制 一.mysql用户授权 1.命令 2.作用:进行权限控制 3.样例: (备注: 同意 ...
- Linux下Tun/Tap设备通信原理
Tun/Tap都是虚拟网卡,没有直接映射到物理网卡,是一种纯软件的实现.Tun是三层虚拟设备,能够处理三层即IP包,Tap是二层设备,能处理链路层网络包如以太网包.使用虚拟网络设备,可以实现隧道,如O ...
- 当CSDN携手Markdown
当CSDN携手Markdown Tags: CSDN Markdown 当CSDN携手Markdown Markdown CSDN-Markdown 也不知道是不是基于 Github 崛起的因素,Ma ...