I wanted to index text from html, in Lucene, what is the best way to achieve this ?
Is there any good Contrib module that can do this in Lucene ?
EDIT
Finally ended up using Jericho Parser. It doesn't create DOM and is easy to use.
I'm assuming that you don't actually want to index the HTML tags. If that's the case, you can first extract text from HTML using Apache Tika. Then you can index the text in Lucene.
I would recommend using Jsoup HTML parser to extract the text and then use Lucene. It worked well for me.
You might also want to take a look at /Lucene-3.0.3/src/demo which has an HTML parser example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With