On Tue, Apr 5, 2011 at 10:06 AM, Shai Erera wrote:
> Can we use TermEnum to skip to the first term 'after 3 weeks'? If so, we can
> pull the first doc that appears in the TermDocs of that Term (if it's a
> valid term).
Yep. Try this to get the term you want to use to seek:
BytesRef term
Hi
We have a date field which is indexed as NumericField and we'd like to
get the first docid that is since 3 weeks ago. Currently we're doing
something like this:
{code}
Query q = NumericRangeQuery.newLongRange("date", timeBefore3Weeks,
System.currentTimeMillis(), true, true);
Scorer s = q.weigh