aspose file tools*
The moose likes Other Open Source Projects and the fly likes Some tips to implement this in Lucene Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Some tips to implement this in Lucene" Watch "Some tips to implement this in Lucene" New topic
Author

Some tips to implement this in Lucene

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi.
I collect many Java sources from the web (java.sun.com , java.net , dw , dev2dev ...) and it became really painful to search for a specific title.
So I decided to build my own search utility based upon SWT and Lucene and my question is about Lucene (I'm not expert in this IR engine).
This application should be to recognize if I added/removed articles to/from where I store my resources.
Which means at least to me that this application should update its index repository each time it run.
1. How to implement this in Lucene (to update its repository) ?
2. Any other ideas or suggestions ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41571
    
  54
What platform are you working on? On Unix/Linux, Windows and OS X it would be relatively easy to put together a script that searches through multiple directories.

If you're set to use Lucene, I'd rather create the index from scratch every night or so, instead of trying to keep track of which file may have changed and updating the index every time. While it's possible to update indices with Lucene, the previously added version must be removed first, which introduces some complexities.


Ping & DNS - my free Android networking tools app
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Windows XP SP2
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41571
    
  54
You can install Unxutils, which will give you many of the Unix command line utilities. grep in particular would be very helpful in performing searches like you describe.

Another option (which does not require to install Unxutils) would be AGREP, which can also perform approximate searches. That's handy if one can't remember the exact title to search for.
 
wood burning stoves
 
subject: Some tips to implement this in Lucene