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,这种形 ...
随机推荐
- Android 动态生成对话框和EditText
/** * (获取输入) */ private void showInputDialog() { ScrollView scrollview = getInitView() ; final Linea ...
- flask的restful api模块flask_restful和认证模块flask_httpauth
参考: 1.https://zhuanlan.zhihu.com/p/24629177 2.https://github.com/shengulong/LearnPython/blob/master/ ...
- TensorFlow 之 高层封装slim,tflearn,keras
tensorflow资源整合 使用原生态TensorFlow API来实现各种不同的神经网络结构.虽然原生态的TensorFlow API可以很灵活的支持不同的神经网络结构,但是其代码相对比较冗长,写 ...
- android 5.2
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc2VyZ2V5Y2Fv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ...
- vue2.0 自定义 弹窗(MessageBox)组件
组件模板 src/components/MessageBox/index.vue <!-- 自定义 MessageBox 组件 --> <template> <div c ...
- Python操作MySQL:pymysql和SQLAlchemy
本篇对于Python操作MySQL主要使用两种方式: 原生模块 pymsql ORM框架 SQLAchemy pymsql pymsql是Python中操作MySQL的模块,其使用方法和MySQLdb ...
- HTML+CSS要点
1.td占据多行 / 列时,其挤开的 td 不写(但是包裹 td 的 tr 要写) 2. display:td 的元素中的文本默认垂直不居中(table中的td中的文本是垂直居中的) 3.th虽然定义 ...
- impdp因致命错误终止 ORA-7445 [kpodpals]
基本要素 前天好不easy成功给用户把数据全库导出,今天用户又告知导出的数据无法导入,首先就问用户有什么错误提示,给我的回答是就一个'作业"SYSTEM"."SYS_IM ...
- CUGBACM_Summer_Tranning1 二进制枚举+模拟+离散化
整体感觉:这个组队赛收获还挺多的.自从期末考试以后已经有一个多月没有 做过组队赛了吧,可是这暑假第一次组队赛就找回了曾经的感觉.还挺不错的!继续努力!! 改进的地方:这次组队赛開始的时候题目比較难读懂 ...
- 调试LD_PRELOAD注入的代码
LD_PRELOAD提供了平民化的注入方式固然方便,同一时候也有不便:注入库出错后调试比較困难. 我琢磨了几天找到了可行的调试方法,当然未必是最有效的办法.抛出陋文,希望引来美玉~ 首先.写一段代码作 ...