Mailing List Archive

cvs commit: jakarta-lucene/src/java/org/apache/lucene/search DateFilter.java
cutting 02/01/21 09:12:12

Modified: src/java/org/apache/lucene/search DateFilter.java
Log:
Substantially improved the performance of DateFilter by adding the
ability to reuse TermDocs objects.

Revision Changes Path
1.2 +2 -1 jakarta-lucene/src/java/org/apache/lucene/search/DateFilter.java

Index: DateFilter.java
===================================================================
RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/DateFilter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DateFilter.java 18 Sep 2001 16:29:56 -0000 1.1
+++ DateFilter.java 21 Jan 2002 17:12:12 -0000 1.2
@@ -129,10 +129,11 @@
final public BitSet bits(IndexReader reader) throws IOException {
BitSet bits = new BitSet(reader.maxDoc());
TermEnum enum = reader.terms(new Term(field, start));
+ TermDocs termDocs = reader.termDocs();
try {
Term stop = new Term(field, end);
while (enum.term().compareTo(stop) <= 0) {
- TermDocs termDocs = reader.termDocs(enum.term());
+ termDocs.seek(enum.term());
try {
while (termDocs.next())
bits.set(termDocs.doc());




--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
RE: cvs commit: jakarta-lucene/src/java/org/apache/lucene/search DateFilter.java [ In reply to ]
-1

I don't want a program to automatically re-format my code.

Doug

> -----Original Message-----
> From: Andrew C. Oliver
> [mailto:acoliver.at.apache.org@cutting.at.lucene.com]
> Sent: Tuesday, May 07, 2002 4:45 PM
> To: dcutting@grandcentral.com
> Subject: Re: cvs commit:
> jakarta-lucene/src/java/org/apache/lucene/search DateFilter.java
>
>
> If this is a big enough issue then I say we should install some manner
> of automatic code formatter to be run on checkin. It can format the
> code to whatever the community has agreed the convention is, then Jon
> won't have to serve in this role manually. I'll be happy
> with whichever
> one jon installs since I can always run my own locally.
>
> -Andy
>
> On Tue, 2002-05-07 at 19:14, Jon Scott Stevens wrote:
> > on 5/7/02 3:56 PM, "Otis Gospodnetic"
> <otis_gospodnetic@yahoo.com> wrote:
> >
> > > Sure. Which one? Curlies or indentation or?
> >
> > http://java.sun.com/docs/codeconv/html/CodeConventions.doc6.html#449
> >
> > > You can make the changes yourself, too, as you have
> commit priviledges.
> >
> > I shouldn't have to clean up your mess. :-)
> >
> > -jon
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-dev-help@jakarta.apache.org>
>
--
http://www.superlinksoftware.com - software solutions for business
http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in
Java
http://krysalis.sourceforge.net/centipede - the best build/project
structure
a guy/gal could have! - Make Ant simple on complex
Projects!
The avalanche has already started. It is too late for the pebbles to
vote.
-Ambassador Kosh


--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>