You just have to loop recurssively over the C:\tomcat\webapps\Root tree to create your
index.
Yes you can index databases; you will just have to write a mechanism that is able to
create org.apache.lucene.document.Document from database.
For instance :
- connect JDBC
- run a query for obtaining a ResultSet
- loop for each row of that ResultSet :
Create a new org.apache.lucene.document.Document from ResultSet data
and add this document to the Index.
end loop.
For incremental indexing, I suppose you have to store some timestamp field in your
index; but it's up to you.
Note that Lucene is very fast and I don't think that incremetal indexing is required
for small or medium amout of data.
-----Message d'origine-----
De : mahaveer jain [mailto:[EMAIL PROTECTED]
Envoy� : mardi 14 septembre 2004 17:22
� : [EMAIL PROTECTED]
Objet : Help for text based indexing
Hi
I have implemented Text based search using lucene. I was wonderful playing around with
it.
Now I want to enchance the application.
I have a Root folder, under that I have many other folder, that are group specific,
say (group1, group2, .. so on). The Root folder is in C:\tomcat\webapps\Root and group
folder within that.
Now I am index for these groups separately, ie , I have index as C:/index/group1,
C:/index/group2, C:/index/group3 and so on
I want to know if I can have only one index for all these say C:/index/Root (this has
index for all the folder) and I should be able to Search using
C:\tomcat\webapps\Root\group1(if want to search for group1) similarly for the other
groups.
Let me know if this is possible and have anybody tried this.
2nd question
Is lucene good to index databases ? How do we support incremental indexing ?
(Right now I am using LIKE for searching )
Thanks in Advance
Mahaveer
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]