range-query

Lucene LongPoint Range search doesn't work

我的梦境 提交于 2021-02-08 10:12:48
问题 I am using Lucene 8.2.0 in Java 11. I am trying to index a Long value so that I can filter by it using a range query, for example like so: +my_range_field:[1 TO 200] . However, any variant of that, even my_range_field:[* TO *] , returns 0 results in this minimal example. As soon as I remove the + from it to make it an OR , I get 2 results. So I am thinking I must make a mistake in how I index it, but I can't make out what it might be. From the LongPoint JavaDoc: An indexed long field for fast

Lucene LongPoint Range search doesn't work

六月ゝ 毕业季﹏ 提交于 2021-02-08 10:08:03
问题 I am using Lucene 8.2.0 in Java 11. I am trying to index a Long value so that I can filter by it using a range query, for example like so: +my_range_field:[1 TO 200] . However, any variant of that, even my_range_field:[* TO *] , returns 0 results in this minimal example. As soon as I remove the + from it to make it an OR , I get 2 results. So I am thinking I must make a mistake in how I index it, but I can't make out what it might be. From the LongPoint JavaDoc: An indexed long field for fast

Lucene 2.4.0 Range Query is not working as expected

守給你的承諾、 提交于 2020-01-05 09:02:54
问题 Below are the indexed fields with value: EffectiveDate="1970" ExpirationDate="2035" Code to create index and seach: public class IndexTest{ static Analyzer analyzer = new StandardAnalyzer(); static IndexSearcher isearcher; @BeforeClass public static void createIndex() throws CorruptIndexException, LockObtainFailedException, IOException{ Store s = Field.Store.YES; Store ds = Field.Store.YES; Index IA = Field.Index.ANALYZED; Index INA = Field.Index.NOT_ANALYZED; IndexWriter iwriter = new

Range Queries in Cassandra (CQL 3.0)

天大地大妈咪最大 提交于 2019-12-09 10:27:07
问题 One main part of Cassandra that I don't fully understand is its range queries. I know that Cassandra emphasizes distributed environment and focuses on performance, but probably because of that, it currently only support several types of ranges queries that it can finish efficiently, and what I would like to know is that: which types of range queries are supported by Cassandra. As far as I know, Cassandra supports the following range queries: 1: Range Queries on Primary key with keyword TOKEN

Range query with elasticsearch for string

邮差的信 提交于 2019-12-09 07:21:21
问题 I am trying use range query with elasticsearch { "query": { "range": { "order_no": { "gte": "VM-0001", "lte": "VM-0005" } } } } But elastic return no result. I found system have problem with string include - or _ This is mapping of that field: "order_no" : { "type" : "string", "index_analyzer" : "str_index_analyzer", "search_analyzer" : "str_search_analyzer" } { "analysis": { "analyzer": { "str_search_analyzer": { "tokenizer": "keyword", "filter": [ "lowercase" ] }, "str_index_analyzer": {

Cassandra CQL range query rejected despite equality operator and secondary index

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 04:22:14
问题 From the table schema below, I am trying to select all pH readings that are below 5. I have followed these three pieces of advice: Use ALLOW FILTERING Include an equality comparison Create a secondary index on the reading_value column. Here is my query: select * from todmorden_numeric where sensor_name = 'pHradio' and reading_value < 5 allow filtering; Which is rejected with this message: Bad Request: No indexed columns present in by-columns clause with Equal operator I tried adding a

Doing range queries in Mongoose for Hour / Day / Month/ Year

你离开我真会死。 提交于 2019-12-06 02:28:02
问题 Trying to figure out how to do this. Basically I want to sort by Hour / Day / Month / Year of my submissions. Each submission has a created field which contains a Mongoose Date object in the form of "created" : ISODate("2013-03-11T01:49:09.421Z") . Do I need to compare against this in the find() conditions? Here is my current query (I'm wrapping it in a count for pagination purposes FWIW so just ignore that part): getSubmissionCount({}, function(count) { // Sort by the range switch (range) {

Cassandra CQL range query rejected despite equality operator and secondary index

非 Y 不嫁゛ 提交于 2019-12-04 09:21:40
From the table schema below, I am trying to select all pH readings that are below 5. I have followed these three pieces of advice: Use ALLOW FILTERING Include an equality comparison Create a secondary index on the reading_value column. Here is my query: select * from todmorden_numeric where sensor_name = 'pHradio' and reading_value < 5 allow filtering; Which is rejected with this message: Bad Request: No indexed columns present in by-columns clause with Equal operator I tried adding a secondary index to the sensor_name column and was told that it was already part of the key and therefore

Doing range queries in Mongoose for Hour / Day / Month/ Year

北城以北 提交于 2019-12-04 07:09:55
Trying to figure out how to do this. Basically I want to sort by Hour / Day / Month / Year of my submissions. Each submission has a created field which contains a Mongoose Date object in the form of "created" : ISODate("2013-03-11T01:49:09.421Z") . Do I need to compare against this in the find() conditions? Here is my current query (I'm wrapping it in a count for pagination purposes FWIW so just ignore that part): getSubmissionCount({}, function(count) { // Sort by the range switch (range) { case 'today': range = now.getTime(); case 'week': range = now.getTime() - 7; case 'month': range = now