"), long("20190101115959"))
>
>No results.
>
>query = LongPoint.newRangeQuery("xdate", long("2019010100"),
>long("20190101115959"))
>
>No results.
>
>How to get the results on my old indexes using date range query?
>
>Can anyone help?
>
>Thanks
--
Uwe Schindler
Achterdiek 19, 28357 Bremen
https://www.thetaphi.de
long("2019010100"), long("20190101115959"))
No results.
query = LongPoint.newRangeQuery("xdate", long("2019010100"),
long("20190101115959"))
No results.
How to get the results on my old indexes using date range query?
Can anyone help?
Thanks
I have a numeric range query to perform in an index. I begin by indexing a
document with a field value of "300". When I search for a range [100 TO 400] I
get results from the search operation. Strangely enough, when I search for [100
TO 4000], I don't get any search results.
gt;> > On Thu, Dec 22, 2016 at 6:57 PM, Kumaran Ramasubramanian
>> > wrote:
>> >> Thank you Adrien.
>> >>
>> >> "NumericDocValuesField is the one that supports sorting."
>> >>
>> >> Does this mean LongField/IntFie
one that supports sorting."
> >>
> >> Does this mean LongField/IntField just supports lexicographic order in
> >> sorting?
> >>
> >>
> >> -
> >> Kumaran R
> >>
> >>
> >>
> >> On Dec 22, 2016 11:28
>> -
>> Kumaran R
>>
>>
>>
>> On Dec 22, 2016 11:28 PM, "Adrien Grand" wrote:
>>
>> Le jeu. 22 déc. 2016 à 18:50, Kumaran Ramasubramanian
>> a écrit :
>>
>>> I want to provide sorting, range search and faceting
t;
> -
> Kumaran R
>
>
>
> On Dec 22, 2016 11:28 PM, "Adrien Grand" wrote:
>
> Le jeu. 22 déc. 2016 à 18:50, Kumaran Ramasubramanian
> a écrit :
>
>> I want to provide sorting, range search and faceting in numeric fields.
>>
>> AFAIK, Purpo
nian
a écrit :
> I want to provide sorting, range search and faceting in numeric fields.
>
> AFAIK, Purpose of different numeric field types are,
>
> NumericDocValuesField supports sorting and faceting
> LongField/IntField supports range query and sorting
>
LongField/IntField onl
Le jeu. 22 déc. 2016 à 18:50, Kumaran Ramasubramanian
a écrit :
> I want to provide sorting, range search and faceting in numeric fields.
>
> AFAIK, Purpose of different numeric field types are,
>
> NumericDocValuesField supports sorting and faceting
> LongField/IntField suppor
Hi All,
I want to provide sorting, range search and faceting in numeric fields.
AFAIK, Purpose of different numeric field types are,
NumericDocValuesField supports sorting and faceting
LongField/IntField supports range query and sorting
1. Should i duplicate one field in above mentioned
Hi - i seem to be having trouble correctly executing a range query on a date
field.
The following Solr document is indexed via a unit test followed by a commit:
view
test_key
2013-01-09T17:11:40Z
I can retrieve the document simply wrapping term queries in a boolean query
Ken,
See BooleanQuery.Builder.
p.s. nice to see you at Apache Big Data in Vancouver.
~ David
On Thu, May 19, 2016 at 4:28 PM Ken Krugler
wrote:
> Hi all,
>
> I’ve got an alternative representation in the index for numeric fields,
> and I need to construct an alternative approach for range queri
Hi all,
I’ve got an alternative representation in the index for numeric fields, and I
need to construct an alternative approach for range queries.
I’m sub-classing BooleanQuery (as ultimately that’s what it is), and ignoring
the deprecation warning about the BooleanQuery() constructor :)
But i
Todd:
"This trick just converts the multi term queries like PrefixQuery or RangeQuery
to boolean query by expanding the terms using index reader."
http://stackoverflow.com/questions/7662829/lucene-net-range-queries-highlighting
beware cost. (my comment)
g’luck
will
> On Dec 23, 2015, at 4:49
I have a NumericRangeQuery and a TermQuery that I am combining into a Boolean
query. I would then like to pass the Boolean query to the highlighter to
highlight both the range and term hits. Currently, only the terms are being
highlighted.
Any help on how to get the range values to highlight
precision step of 4, but my
range query was creating precision step of 8.
return NumericRangeQuery.newLongRange(field.getIndexField(), 8,
Long.parseLong(query.getLowerTerm().utf8ToString()),
Long.parseLong(query.getUpperTerm().utf8ToString()),
query.includesLower
Uwe
Thank you.
I think your earlier hint regarding precision steps solved it. I
noticed that new Long was created with a precision step of 4, but my
range query was creating precision step of 8.
return NumericRangeQuery.newLongRange(field.getIndexField(), 8,
Long.parseLong
Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Jamie [mailto:ja...@mailarchiva.com]
> Sent: Wednesday, July 16, 2014 12:21 PM
> To: java-user@lucene.apache.org
> Subject: Re: lucene 4.0.0 ran
://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Jamie [mailto:ja...@mailarchiva.com]
> Sent: Wednesday, July 16, 2014 12:09 PM
> To: java-user@lucene.apache.org
> Subject: Re: lucene 4.0.0 range query broken?
>
> Here it is
>
> return Num
, 2014 11:15 AM
> To: java-user@lucene.apache.org
> Subject: lucene 4.0.0 range query broken?
>
> Hi
>
> I have a situation whereby the following filter query works with Lucene
> 3.8.1
>
> ChainedFilter: [QueryWrapperFilter(+receivedate:[201407
Uwe
The range query works with lindexes created by 3.8.1, but not 4.0.0. To
me, this indicates that Lucene 4.0.0 is not indexing these longs
correctly, or something of the sort. Do you have any ideas on where to
look?
Jamie
On 2014/07/16, 12:15 PM, Uwe Schindler wrote:
Sorry, no you
rg
> Subject: Re: lucene 4.0.0 range query broken?
>
> Uwe
>
> is there anyway we can downgrade to 3.8.1 while being able to read indexes
> created from 4.0.0?
>
> On 2014/07/16, 11:45 AM, Uwe Schindler wrote:
> > If you index as a long field, you have to
Uwe
is there anyway we can downgrade to 3.8.1 while being able to read
indexes created from 4.0.0?
On 2014/07/16, 11:45 AM, Uwe Schindler wrote:
If you index as a long field, you have to use NumericRangeQuery to query. A
simple TermRangeQuery as created by QueryParser does not work, because
Here it is
return NumericRangeQuery.newLongRange(field.getIndexField(), 8,
Long.parseLong(query.getLowerTerm().utf8ToString()),
Long.parseLong(query.getUpperTerm().utf8ToString()),
query.includesLower(), query.includesUpper());
Range query appears broken in Lucene 4.0.0.
On
Uwe
Thanks for the suggestion.
When I inspect the query in Eclipse, I can clearly see that a
NumericRangeQuery is constructed.
Why would this query work in an older version of Lucene but not 4.0.0.?
Jamie
On 2014/07/16, 11:45 AM, Uwe Schindler wrote:
If you index as a long field, you have
> -Original Message-
> From: Jamie [mailto:ja...@mailarchiva.com]
> Sent: Wednesday, July 16, 2014 11:43 AM
> To: java-user@lucene.apache.org
> Subject: Re: lucene 4.0.0 range query broken?
>
> All
>
> As a further to the below.
>
> We are able to search by range q
All
As a further to the below.
We are able to search by range query when the indexes are created by
3.8.1. When the date field is indexed by 4.0.0, search with date range
query doesn't work.
Here's how we index the date field.
String date = DateUtil.convertDatetoString((Da
Hi
This query does not work either:
QueryWrapperFilter(+archivedate:[20140708 TO 20140731] +cat:email)
Thus, in our mind, Lucene 4.0.0 range query is broken. We tried to
downgrade to v3.8.1, but it wont read indexes created by 4.0.0.
Any recommendations on how to get out of this
. It doesn't work.
Is this a bug? The problem seems to occur when receivedate range query
is added.
Jamie
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-u
uments of a field indexed as LongField. You can directly use
> NumericRangeQuery to create the range query (recommended). Alternatively
> you can subclass QueryParser and override the getRangeQuery protected
> methods to create the correct query type (NumericRangeQuery) based on the
NumericRangeQuery to create the
range query (recommended). Alternatively you can subclass QueryParser and
override the getRangeQuery protected methods to create the correct query type
(NumericRangeQuery) based on the field name.
Uwe
-
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http
Hi
I'm trying to submit a lucene query string to my index to return a data
based on a numeric range. I'm using the syntax provided in the Query
Parser Syntax document but the results I get indicate that the query is not
working correctly. Below is a unit test that proves that the r
Hi,
I have time stamp field for my documents which I have indexed as
DoubleField for NumericRange query to work.
This field "stream_time" is indexed as DoubleField("stream_time",
, Field.Store.No).
I get null value when I query a lucene document for this field by
using document.getField() call.
Do
Actually, there are no results in the range [l220-2 TO l220-10]
This is basically a string comparison, and l220-2 > l220-10 so
this range would never match.
Best
Erick
On Tue, May 17, 2011 at 1:51 PM, G.Long wrote:
> I set the field article to NOT_ANALYZED and I didn't quoted the article
> valu
I set the field article to NOT_ANALYZED and I didn't quoted the article
values in the range part of the query and it looks like it works better now.
However, some results are still missing. For exemple, sometimes a range
like [l220-2 TO l220-10] will not return any results (although i'm sure
t
COM +article:"l123-12"
> +code:CCOM +article:"l123-13"
> +code:CCOM +article:"l123-14"
>
> return one result.
>
> However, the following query :
>
> +code:CCOM +article[l123-12 TO l123-14]
>
> return nothing =(
>
> With other parameters
23-14"
return one result.
However, the following query :
+code:CCOM +article[l123-12 TO l123-14]
return nothing =(
With other parameters, the range query works almost fine but some
results are missing.
What could be the problem? Could it have something to do with the way
the docum
It's likely to have something to do with analyzers. That is the
usually the first thing to come to mind if queries hold upper or mixed
case terms. Maybe Luke is using an analyzer that matches the one you
used when you indexed your documents.
You can use Luke to see what is being stored in the in
Hi Uwe :)
Thank you for your answer ! Now I have another problem. Here is the code
I use to query the index :
ScoreDoc[] hits = null;
TopFieldCollector collector = TopFieldCollector.create(new
Sort(SortField.FIELD_DOC), 20, true, false, false, false);
Directory directory =
e.apache.org
> Subject: how to create a range query with string parameters
>
> Hi there :)
>
> I would like to perform a range query on a lucene index. I'm using lucene
3.1
> api.
> I looked at the javadoc and found a rangeQueryNode but i'm not sure how to
> use it.
>
Hi there :)
I would like to perform a range query on a lucene index. I'm using
lucene 3.1 api.
I looked at the javadoc and found a rangeQueryNode but i'm not sure how
to use it.
I've got a field "article" in my index which is indexed this way :
entry.add(new
; > try {
> >
> > IndexSearcher searcher = new IndexSearcher(reader);
> >
> > TopDocs docs = searcher.search(rangeQuery, 1000);
> >
> > assertEquals(1,docs.totalHits);
> >
> > } finally {
> >
> > reade
t; > >
> > >
> > >
> > > NumericRangeQuery rangeQuery =
> > >
> > > NumericRangeQuery.newLongRange("LastLogin", 1282197146L,
> > > 1282197146L, true, true);
> > >
> > >
> > >
> > > IndexReader reader = Ind
1282197146L,
> > 1282197146L, true, true);
> >
> >
> >
> > IndexReader reader = IndexReader.open(directory, true);
> >
> > try {
> >
> > IndexSearcher searcher = new IndexSearcher(reader);
> >
> > TopDo
gt;
> } finally {
>
> reader.close();
>
> }
>
> }
>
>
>
> Maybe you have the following problems:
>
> - Are you executing the same query than created. In your
> example code the searcher executed “query” but the range q
r(reader);
TopDocs docs = searcher.search(rangeQuery, 1000);
assertEquals(1,docs.totalHits);
} finally {
reader.close();
}
}
Maybe you have the following problems:
- Are you executing the same query than created. In your example code
the searcher executed “
Hi all,
I'm having some issues with Numeric Range queries not working as
expected. My underlying storage medium is the Lucandra index reader and
writer, so I'm not sure if this is an issue within Lucandra or with my
usage of numeric field. My numeric range tests that are copies of Uwe's
pass in
I'm certain the timestamp field is being indexed. It is created as follows:
Document doc = new Document();
NumericField timeField = new NumericField("timestamp", 8); // Defaults to
indexing = true.
timeField.setLongValue( timeX);
doc.add( timeField);
...
indexWriter.a
Hi,
> Thank you for your timely response.
:-)
> It's going to take me longer to create an isolated test case you can test
this
> with. I will see what I can do.
That would be fine. Often with a simple test those errors disappear, because
they are problem in the logic somewhere else :) But you
Sent: Thursday, September 23, 2010 12:23 PM
> To: java-user@lucene.apache.org
> Subject: Problem with Numeric range query.
>
>
> I have a set of documents that all have a "timestamp" field which is
stored as a
> long integer number. The field is indexed in my Lucene inde
ubject: Problem with Numeric range query.
>
>
> I have a set of documents that all have a "timestamp" field which is
stored as a
> long integer number. The field is indexed in my Lucene index as a number
> using NumericField with a precision step of 8:
>
&g
I have a set of documents that all have a "timestamp" field which is stored as
a long integer number. The field is indexed in my Lucene index as a number
using NumericField with a precision step of 8:
Field field = new NumericField("timestamp", 8);
field.setLongValue( timestampValue);
- Nutch
Lucene ecosystem search :: http://search-lucene.com/
- Original Message
> From: "i...@josephcrawford.com"
> To: java-user@lucene.apache.org
> Sent: Fri, April 16, 2010 9:23:30 AM
> Subject: Range Query Assistance
>
> Hello,
I would like to query based
Hello Joseph,
Yes this would work .Range queries could be used for range searches.
But this is very expensive in terms of performance.
Regards,
Suman
On Fri, 16 Apr 2010 06:23:30 -0700, wrote:
> Hello,
>
> I would like to query based on a start and end date. I was thinking
> something like
Hello,
I would like to query based on a start and end date. I was thinking
something like this
start_date: [2101 TO ] end_date: [ TO
20900101]
Would this work for me? Our dates are stored in the index as strings so I
am not sure the syntax above would be correct.
Any assistance would be a
Excellent !!
Thanks for pointing me towards the ComplexPhraseQueryParser.
--Regards
Ba3
Ahmet Arslan wrote:
>
>
>> Can you please suggest me some pointers as to how a range
>> query combined with proximity be done.
>
> Your remedy is ComplexPhraseQueryParser that u
> Can you please suggest me some pointers as to how a range
> query combined with proximity be done.
Your remedy is ComplexPhraseQueryParser that utilizes SpanQuery family.
https://issues.apache.org/jira/browse/LUCENE-1486
That accepts ranges, ORs, Wildcards inside Phrase queries.
Usin
n AND 41" or "revision AND 42"
or .... yielded proper results.
Can you please suggest me some pointers as to how a range query combined
with proximity be done.
-- Regards
Ba3
--
View this message in context:
http://www.nabble.com/Range-query-and-a-proximity-search-tp245828
nt. In this case 'e' becomes 'f'.
I think you'd find this a much more efficient solution than using
wildcards which can be a performance bottleneck.
Regards,
Dan
On Fri, 2008-07-25 at 10:53 +0200, Thomas Becker wrote:
> Hi all,
>
> I need to replace some db quer
Btw. I tried the wildcard since I found something on google, which noted
wildcards together with StartsWith queries.
Thomas Becker wrote:
Hi Ian,
no the wild cards should not be necessary. That was just the last try
out of some. I now the exact content of both fields in my range query.
The
Hi Ian,
no the wild cards should not be necessary. That was just the last try
out of some. I now the exact content of both fields in my range query.
The case is as the java code found it, but the analyzer will lowercase
it anyhow. I'm trying the SimpleAnalyzer since all other seem to
--
Ian.
On Fri, Jul 25, 2008 at 9:53 AM, Thomas Becker <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I need to replace some db queries with lucene due to response time issues
> for sure. In this special case I need to do a range query on a field and a
> prefix query. I'm t
Hi all,
I need to replace some db queries with lucene due to response time
issues for sure. In this special case I need to do a range query on a
field and a prefix query. I'm trying to prepare and try my query in luke
with no success before migrating it to java.
I need to find all
: In the application I'm developing I'm able to query on 2 properties of my
: model: Name and BirthDay. Records that have an exact match on the name
: property and for which the birthday is close to the specified BirthDay query
: parameter should have a higher score.
use a RangeFilter to constrai
Erick Erickson wrote:
Are you using NumberTools both at index and query time? Because
this works exactly as I expect
Yes, the code I posted showed the usage of NumberTools -- here it is
from my 2nd reply:
Taking your advice I'm now indexing using:
document.add( new Field(RateUtils.SF_F
An alternative to Lucene's NumberTools, is Solr's NumberUtils, which is more
space efficient for indexing numbers, but not as pretty to look at
http://lucene.apache.org/solr/api/org/apache/solr/util/NumberUtils.html
Dan Hardiker wrote:
> Hi,
>
> I've got an application which stores ratings fo
Are you using NumberTools both at index and query time? Because
this works exactly as I expect
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import
Erick Erickson wrote:
Although I'm a bit puzzled by what you're actually getting back.
You might try using Luke to look at your index to see what's
there.
I've looked through with Luke and it doesn't look like much has changed
between using NumberTools and not. NumberTools definitely does some
Yep, lucene works with strings, not numbers so the fact that you're
not getting what you expect is expected .
Although I'm a bit puzzled by what you're actually getting back.
You might try using Luke to look at your index to see what's
there.
See the NumberTools class for some help here...
B
Hi,
I've got an application which stores ratings for content in a Lucene
index. It works a treat for the most part, apart from the use-case I
have for being able to filter out ratings that have less than a given
number of rates. It kinda works, but seems to use Alpha ranging rather
than Numer
Hi,
I wanted to make use of a range query to find out data within the range.
eg. minexp : 3 maxexp: 7 if a persons exp: is between 3 and 7 then I can get
his details.
The problem is that if in the index the minexp or the maxexp is null/ empty
i don't want to use the range query for the
In my applications, I have stored the dates as MMDD to make it
simple and easy. Works just fine for me.
regards,
kapilChhabra
Cam Bazz wrote:
Hello,
how can I make a query to bring documents between timestamp begin and
timestamp end, given that I have stored my dates using
DateTools.timeT
There is an example in TestDateFilter
http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestDateFilter.java?view=log
"Cam Bazz" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> how can I make a query to bring documents between timestamp begin and
> timestamp end, given that I
I'd search this mail archive for DateTools, this has been discussed
repeatedly and you'd get lots and lots of info.
Erick
On 12/14/06, Cam Bazz <[EMAIL PROTECTED]> wrote:
Hello,
how can I make a query to bring documents between timestamp begin and
timestamp end, given that I have stored my da
Hello,
how can I make a query to bring documents between timestamp begin and
timestamp end, given that I have stored my dates using
DateTools.timeToString(long)?
Best regards,
-C.B.
: It's clear that my problem here comes from a lack of understanding of
: the semantics of SHOULD, MUST, and MUST_NOT.
:
: I haven't found a clear description of this (except for a brief
: comment here
: http://mail-archives.apache.org/mod_mbox/lucene-java-dev/200408.mbox/[EMAIL
PROTECTED]).
: Mo
I sometimes find it helpful to think of the query parts as applying
'filtering' logic, helping to understand how query components play together
in determining the acceptable set of results (mostly ignoring scoring here,
which would usually sort the candidate results).
Consider a set of 10 douments
On Oct 5, 2006, at 4:59 AM, Tom Hill wrote:
It's clear that my problem here comes from a lack of understanding
of the semantics of SHOULD, MUST, and MUST_NOT.
I haven't found a clear description of this (except for a brief
comment here http://mail-archives.apache.org/mod_mbox/lucene-java-
Hi -
Thanks, Yonik, Chris and Doron for the quick responses.
Doron's comment about combining the queries was the key to what was
causing me problems. I had indeed been combining with other queries,
which results in 'extra' results being returned.
I've attached a sample program below that ill
>
> : The query you want is
> : name:[A TO C] name:[G TO K]
> : (each clause being SHOULD, or put another way, an implicit "OR" in
between.
> :
> : The problem may be how you analyze the name field... is it tokenized at
all?
> : If so, you might be matching on first, last, and middle names, and the
: The query you want is
: name:[A TO C] name:[G TO K]
: (each clause being SHOULD, or put another way, an implicit "OR" in between.
:
: The problem may be how you analyze the name field... is it tokenized at all?
: If so, you might be matching on first, last, and middle names, and the
: combinatio
Hi Tom,
The query you want is
name:[A TO C] name:[G TO K]
(each clause being SHOULD, or put another way, an implicit "OR" in between.
The problem may be how you analyze the name field... is it tokenized at all?
If so, you might be matching on first, last, and middle names, and the
combination of
Hi -
I'm having a bit of trouble building a query to match a range of
values in a field that is not continuous.
For an example, say I want to find all people with last names
starting with A-C, and G-K.
If I use MUST on each element of the range, then I get nothing. This
I think I understan
RangeQueries are evil.
http://wiki.apache.org/jakarta-lucene/FilteringOptions
- Original Message
From: Bhavin Pandya <[EMAIL PROTECTED]>
To: java-user@lucene.apache.org
Sent: Wednesday, 13 September, 2006 3:22:38 PM
Subject: range query
Hi,
I am using lucene from last few
Hi,
I am using lucene from last few months...I have question about the range query
performance...
Is there any alternative of range query or can i fire a range query on a small
set of documents so that it can be less expensive...
- Bhavin pandya
do a RangeQuery with "Auburn University" as the beginning term,
though that might not work for your other searching needs.
Erik
On Jun 28, 2005, at 2:49 PM, Andrew Boyd wrote:
Hi All,
When I try to do a Range Query with Phrase as one of the end
points I'm not getting th
Hi All,
When I try to do a Range Query with Phrase as one of the end points I'm not
getting the results I would expect.
Here is a JUnit that shows what I'm trying to do. It fails on the last
assertEquals
public void testRangeBug(){
try{
RAMDirectory ra
87 matches
Mail list logo