You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Rohan Thakur <ro...@gmail.com> on 2013/02/20 14:01:44 UTC
html parsing with dataimport handler from sql column
hi all
I have data stored in HTML format in a column in sql database and want to
index the data from that field to solr how can I do that any one has idea
please help. right now i am treating it as a string which is indexing
complete HTML with tags as one string to solr.
regards
Rohan
Re: html parsing with dataimport handler from sql column
Posted by tuxdna <tu...@gmail.com>.
> yes I dont have html as documents I have data saved in sql data base in
> HTML format and I want to index it on solr but not as complete string that
> is with tags but just want to index the actual text in it...that is strip
> off the tags.
>
You might want to look at DataImportHandler and TikaEntityProcessor
which I have described here [1].
/tuxdna
[1] http://tuxdna.wordpress.com/2013/02/04/indexing-the-documents-stored-in-a-database-using-apache-solr-and-apache-tika/
Re: html parsing with dataimport handler from sql column
Posted by Rohan Thakur <ro...@gmail.com>.
hi
yes I dont have html as documents I have data saved in sql data base in
HTML format and I want to index it on solr but not as complete string that
is with tags but just want to index the actual text in it...that is strip
off the tags.
regards
Rohan
On Wed, Feb 20, 2013 at 6:40 PM, Gora Mohanty <go...@mimirtech.com> wrote:
> On 20 February 2013 18:31, Rohan Thakur <ro...@gmail.com> wrote:
> > hi all
> >
> > I have data stored in HTML format in a column in sql database and want to
> > index the data from that field to solr how can I do that any one has idea
> > please help. right now i am treating it as a string which is indexing
> > complete HTML with tags as one string to solr.
>
> How do you want to process the HTML? If you simply want to
> strip HTML tags, please take a look at the HTMLStripTransformer
> http://wiki.apache.org/solr/DataImportHandler#HTMLStripTransformer
>
> Your title implies that you want to parse the HTML in some
> fashion. If so, you will need to do that on your own, e.g., by
> using a transformer.
>
> Regards,
> Gora
>
Re: html parsing with dataimport handler from sql column
Posted by Gora Mohanty <go...@mimirtech.com>.
On 20 February 2013 18:31, Rohan Thakur <ro...@gmail.com> wrote:
> hi all
>
> I have data stored in HTML format in a column in sql database and want to
> index the data from that field to solr how can I do that any one has idea
> please help. right now i am treating it as a string which is indexing
> complete HTML with tags as one string to solr.
How do you want to process the HTML? If you simply want to
strip HTML tags, please take a look at the HTMLStripTransformer
http://wiki.apache.org/solr/DataImportHandler#HTMLStripTransformer
Your title implies that you want to parse the HTML in some
fashion. If so, you will need to do that on your own, e.g., by
using a transformer.
Regards,
Gora