Hi all,
I would like to know if it possible to create several Lucene documents from one record in the database. I have the url file in the database and I want to index every paragraph associated with its anchor (<a name="example"></a>) in order to perfom the search and paragraph position.
So for example if I have the record in my database with the :
File database table
FileNameexample1.html
with the following text:
Code:
....
the book is fine <a name="ex1"></a>
i love trees <a name="ex2"></a>
play with me <a name="ex3"></a>
.....
I would like index the following:
url ----------------------
textexample1.html#ex1------------the book is fine
example1.html#ex2------------i love trees
example1.html#ex3------------play with me
I have all the process implemented in order to create the paragraphs but I have to figure out how to index the three documents from the one database record.
I am thinking about using natively Lucene:
Code:
org.apache.lucene.store.Directory directory = searchFactory.getDirectoryProviders(FileEntity.class)[0].getDirectory();
Any ideas?
Thanks!