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. Multithread之为什么spinlock必须是volatile?

    [Multithread之为什么spinlock必须是volatile?] 1.编译器的优化 在本次线程内,当读取一个变量时,为提高存取速度,编译器优化时有时会先把变量读取到一个寄存器中:以后再取变量 ...

  2. 更改FP SYSTEM密码

    1 Please create a new account and set a new password 2 backup table ABPPMGR.USER_PROFILE , ABPPMGR . ...

  3. a=a++问题引发的思考

    使用javap命令解析出来的a=a++过程的字节码(int a=1; a=a++): 0: iconst_1  将数值1压入栈顶 1: istore_1  栈顶值1存入局部变量表的第一个slot中 2 ...

  4. js日期格式化 扩展Date()

    javascript Date format(js日期格式化) 方法一: // 对Date的扩展,将 Date 转化为指定格式的String // 月(M).日(d).小时(H/h).分(m).秒(s ...

  5. nano编辑器

    1.ctrl+O 2.回车 3.ctrl+exit

  6. 在sublime text中添加JavaScript的build-system

    -step 1: 下载安装node.js, 并添加到path变量中. -step 2: 在sublime text中新建一个build-system. tools --> build-syste ...

  7. About Game Controllers

    [About Game Controllers] Game Controller(GC),框架从iOS 7和OS X v10.9开始加入,用于便捷使用控制器(手柄). Once discovered, ...

  8. tomcat运行为什么要依靠jdk

    问题1:为什么要装jdk 因为tomcat是用java写的,所以运行需要JRE,就是JAVA运行时刻环境,所以必须通过安装JDK来得到这个运行环境,不装JDK装JRE也行,sun的网站上有下载.但是J ...

  9. ACTIVIT 5.15.1修改记录

    1.ProcessDefinitionEntity 将 protected transient ActivitiEventSupport eventSupport; 修改成: protected  A ...

  10. DataGridView相关代码

    加行号: private void dgv_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { //添加行号 var ...