lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Outar" <rou...@ideorlando.org>
Subject RE: Indexing Growth
Date Wed, 02 Apr 2003 15:52:59 GMT
/**
     * Returns true if the index has changed.
     * @return true iff the index has been changed since the IndexSearcher
     * class was created.
     * @build 10
     */
    private synchronized boolean hasIndexChanged() {

        try {
            long temp = IndexReader.lastModified(this.indexLocation);
            return temp > this.lastModified;
        }
        //assume it has changed
        catch (IOException e) {
            return true;
        }
    }

    /**
     * Checks whether the index has changed since the IndexSearcher was
     * created, if it has IndexSearcher is reinitalized.
     *  @build 10
     */
    private synchronized void checkForIndexChange() {

        try {
            if ( hasIndexChanged()) {
                this.searcher = new IndexSearcher(this.indexLocation);
            }
        }
        catch (IOException e) {

        }
    }



Thanks,

Rob


-----Original Message-----
From: Ian Lea [mailto:ian@digimem.net]
Sent: Wednesday, April 02, 2003 10:32 AM
To: Rob Outar
Cc: Lucene Users List
Subject: RE: Indexing Growth


They look like the type of file name that would be created
when documents were added to the index.  So I still think
something is adding stuff to your index.  Could it be an
external process as someone suggested?  Does the index
grow even if you don't search?  In the code you posted,
what does checkForIndexChange() do?  Yes, I can guess what
it is supposed to do, but is it perhaps doing something else
as well or instead, directly or indirectly?


--
Ian.

> routar@ideorlando.org (Rob Outar) wrote
>
> After building the index for the first time:
>
> _l1d.f1  _l1d.f3  _l1d.f5  _l1d.f7  _l1d.f9   _l1d.fdx  _l1d.frq  _l1d.tii
> deletable
> _l1d.f2  _l1d.f4  _l1d.f6  _l1d.f8  _l1d.fdt  _l1d.fnm  _l1d.prx  _l1d.tis
> segments
>
> After running first query to get all attributes from all files in the
given
> directory, there were 17 files, each file has 5 attributes so 85 queries
> were ran:
>
> _l1j.f1   _l1p.f9   _l21.f3   _l27.fdx  _l2j.f5   _l2p.prx  _l31.f7
> _l3j.f1   _l3p.f9   _l41.f3   _l44.fdx
> _l1j.f2   _l1p.fdt  _l21.f4   _l27.frq  _l2j.f6   _l2p.tis  _l31.f8
> _l3j.f2   _l3p.fdt  _l41.f4   _l44.frq
> ...

----------------------------------------------------------------------
Searchable personal storage and archiving from http://www.digimem.net/



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message