• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Lucene index on fly

 
Ranch Hand
Posts: 87
Hibernate Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have indexed from filesystem and database. It was huge data and almost takes 6 hr to complete the index.

Now I want to index on the fly the new added files in database and filesytstem. Can anyone point me to any example.

Is there way to update document?

will the below line only add new docs or even update the exiting one. Does it take same time to indexx it??
writer = new IndexWriter(dir, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);


thanks in advance
Smitha
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking if it is possible to update an index with newly added data without have to reindex everything that is in the index already? If so, then yes - that is possible.

The indexing code might be in a method that takes the IndexWriter and the File object as parameter - that way it needn't be concerned with whether the index is old or new, and can be called both from the code that creates a completely new index, and code that updates the index with recent data.
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!