Looking at the source code, there are two overloads of the OnField method. When I use the the that takes Linq expression parameter, the query does not return any data. But I was able to make it work with the other overload, which takes string value, where I am passing the field name of the elasticsearch document as a string. Here's the query that returns expected results:

var resultSet = _elasticSearchClient.Search<Amqp>(q => q.Query
(p => p.Range(v => v.OnField("LogGenerationTime").GreaterOrEquals(lowerBound))).Size(10000));

How to write date range query in Nest ElasticSearch client?的更多相关文章

  1. How to add a date range picker to filter for dates on a GridView for Yii2 - See more at: http://www.2amigos.us/blog/how-to-add-a-date-range-picker-to-filter-for-dates-on-a-gridview-for-yii2#sthash.pf7

    Filtering the data we have on our GridView by dates are sometimes very important. On this article I ...

  2. elasticsearch term 查询二:Range Query

    Range Query 将文档与具有一定范围内字词的字段进行匹配. Lucene查询的类型取决于字段类型,对于字符串字段,TermRangeQuery,对于数字/日期字段,查询是NumericRang ...

  3. SuRF : Practical Range Query Filtering with Fast Succinct Tries

    1. Introduction 在数据库管理系统中查找某些关键字会导致很大的磁盘I/O开销,针对这一问题,通常会使用一个内存开销小并且常驻内存的过滤器来检测该关键字是否存.比如现在常用的bloom过滤 ...

  4. NEST.net Client For Elasticsearch简单应用

    NEST.net Client For Elasticsearch简单应用 由于最近的一个项目中的搜索部分要用到 Elasticsearch 来实现搜索功能,苦于英文差及该方面的系统性资料不好找,在实 ...

  5. NEST.net Client

    NEST.net Client For Elasticsearch简单应用 由于最近的一个项目中的搜索部分要用到 Elasticsearch 来实现搜索功能,苦于英文差及该方面的系统性资料不好找,在实 ...

  6. Query DSL for elasticsearch Query

    Query DSL Query DSL (资料来自: http://www.elasticsearch.cn/guide/reference/query-dsl/) http://elasticsea ...

  7. Sharepoint 2010 splist url query for date range

    after many attemps,i'v found that Filter feature support the greater than and less than. ie:http://s ...

  8. 【题解】【数组】【Prefix Sums】【Codility】Genomic Range Query

    A non-empty zero-indexed string S is given. String S consists of N characters from the set of upper- ...

  9. Date Range Picker时间插件非常不错,主要体现在选择一个时间区间

    地址:http://www.daterangepicker.com/ demo地址:http://tamble.github.io/jquery-ui-daterangepicker/#event a ...

随机推荐

  1. Mybatis之XML使用Enum枚举传递数据

    在Mybatis中,处理枚举类的TypeHandler有两个: EnumTypeHandler: 用于保存枚举名 EnumOrdinalTypeHandler: 用于保存枚举的序号. 在实际项目中,以 ...

  2. Redis AOF文件

    [Redis AOF文件] 1.关于AOF AOF 持久化记录服务器执行的所有写操作命令,并在服务器启动时,通过重新执行这些命令来还原数据集. AOF 文件中的命令全部以 Redis 协议的格式来保存 ...

  3. 非root用户使用1024以下端口

      如果你有一个最新的内核,确实有可能使用它作为非root用户启动服务,但绑定低端口.最简单有效的办法是: #setcap 'cap_net_bind_service=+ep' /path/to/pr ...

  4. classpath 和 classpath* 的区别:

    classpath指的是java代码生成的class的路径. classpath 和 classpath* 区别: classpath:只会到你的class路径中查找找文件; classpath*:不 ...

  5. 数据库帮助类 SqlServerHelp

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...

  6. DropDownList绑定数据的几种方式

    1. 视图中添加可以直接通过单击属性"Items"后的按钮为某一DropDownList控件添加数据项.每添加一项数据就是添加了一个ListItem(列表控件中的数据项).这种方式 ...

  7. was not registered for synchronization because synchronization is not active

    报SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7862f70e] was not registered for s ...

  8. git 命令使用常见问题

    查看远端地址 git remote –v 查看配置 git config --list git status git add . // 暂存所有的更改 git checkout . // 丢弃所有的更 ...

  9. R学习笔记-安装R和RStudio,注意RStudio的版本需要与操作系统版本匹配

    1.安装步骤:先安装R,再安装RStudio RStudio是R的集成开发工具,本身不带R环境. 2.从当前R的官网和RStudio下载的R和RStudio的版本分别为: A .For Windows ...

  10. 关于Yii2.0的url路径优化问题(配置虚拟路径)

    backend/config/main.php 'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => fa ...