lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject RE: Updating documents
Date Fri, 22 Nov 2002 18:34:31 GMT
No, only each time the index is modified after the time you created
your last IndexSearcher instance, if I remember correctly.

Otis

--- Rob Outar <routar@ideorlando.org> wrote:
> There is a reloading issue but I do not think lastModified is it:
> 
> static long lastModified(Directory directory)
>           Returns the time the index in this directory was last
> modified.
> static long lastModified(File directory)
>           Returns the time the index in the named directory was last
> modified.
> static long lastModified(String directory)
>           Returns the time the index in the named directory was last
> modified.
> 
> Do I need to create a new instance of IndexSearcher each time I
> search?
> 
> Thanks,
> 
> Rob
> 
> 
> -----Original Message-----
> From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
> Sent: Friday, November 22, 2002 12:20 PM
> To: Lucene Users List
> Subject: Re: Updating documents
> 
> 
> Don't you have to make use of lastModified method (I think in
> IndexSearcher), to 'reload' your instance of IndexSearcher?  I'm
> pulling this from some old, not very fresh memory....
> 
> Otis
> 
> --- Rob Outar <routar@ideorlando.org> wrote:
> > I have something odd going on, I have code that updates documents
> in
> > the
> > index so I have to delete it and then re add it.  When I re-add the
> > document
> > I immediately do a search on the newly added field which fails.
> > However, if
> > I rerun the query a second time it works??  I have the Searcher
> class
> > as an
> > attribute of my search class, does it not see the new changes? 
> Seems
> > like
> > when it is reinitialized with the changed index it is then able to
> > search on
> > the newly added field??
> >
> > Let me know if anyone has encountered this.
> >
> > Thanks,
> >
> > Rob
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus  Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus  Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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


Mime
View raw message