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 Dileepa Jayakody <di...@gmail.com> on 2013/11/15 08:48:18 UTC

An UpdateHandler to run following a MySql DataImport

Hi All,

I have written a custom update request handler to do some custom processing
of documents and configured the /update handler to use my custom handler in
the default: update.chain.

The same requestHandler should be configured for the data-import-handler
when it loads documents to solr index.
Is there a way configure the dataimport handler to use my custom
updatehandler in a update.chain?

If not how can I perform the required custom processing of the document
while importing data from a mysql database?

Thanks,
Dileepa

Re: An UpdateHandler to run following a MySql DataImport

Posted by Erick Erickson <er...@gmail.com>.
Yep, that should work, never crossed my mind but it sure makes sense!

Good sleuthing!

Erick


On Fri, Nov 15, 2013 at 9:15 AM, Dileepa Jayakody <dileepajayakody@gmail.com
> wrote:

> I found out that you can configure any requestHandler to run a
> requestProcessor chain.
> So in my /dataimport requestHandler I just called my custom requestHandler
> as a chain;
>
> eg:
>
>  <requestHandler name="/dataimport" class="solr.DataImportHandler">
> <lst name="defaults">
> <str name="config">data-config.xml</str>
> *<str name="update.chain">stanbolInterceptor</str>*
> </lst>
>    </requestHandler>
>
> It works.
>
> Thanks,
> Dileepa
>
>
> On Fri, Nov 15, 2013 at 6:08 PM, Erick Erickson <erickerickson@gmail.com
> >wrote:
>
> > Hmmm, don't quite know the answer to that, but when things
> > start getting complex with DIH, you should seriously consider
> > a SolrJ solution unless someone comes up with a quick fix.
> > Here's an example.
> >
> > http://searchhub.org/2012/02/14/indexing-with-solrj/
> >
> > Best,
> > Erick
> >
> >
> > On Fri, Nov 15, 2013 at 2:48 AM, Dileepa Jayakody <
> > dileepajayakody@gmail.com
> > > wrote:
> >
> > > Hi All,
> > >
> > > I have written a custom update request handler to do some custom
> > processing
> > > of documents and configured the /update handler to use my custom
> handler
> > in
> > > the default: update.chain.
> > >
> > > The same requestHandler should be configured for the
> data-import-handler
> > > when it loads documents to solr index.
> > > Is there a way configure the dataimport handler to use my custom
> > > updatehandler in a update.chain?
> > >
> > > If not how can I perform the required custom processing of the document
> > > while importing data from a mysql database?
> > >
> > > Thanks,
> > > Dileepa
> > >
> >
>

Re: An UpdateHandler to run following a MySql DataImport

Posted by Dileepa Jayakody <di...@gmail.com>.
I found out that you can configure any requestHandler to run a
requestProcessor chain.
So in my /dataimport requestHandler I just called my custom requestHandler
as a chain;

eg:

 <requestHandler name="/dataimport" class="solr.DataImportHandler">
<lst name="defaults">
<str name="config">data-config.xml</str>
*<str name="update.chain">stanbolInterceptor</str>*
</lst>
   </requestHandler>

It works.

Thanks,
Dileepa


On Fri, Nov 15, 2013 at 6:08 PM, Erick Erickson <er...@gmail.com>wrote:

> Hmmm, don't quite know the answer to that, but when things
> start getting complex with DIH, you should seriously consider
> a SolrJ solution unless someone comes up with a quick fix.
> Here's an example.
>
> http://searchhub.org/2012/02/14/indexing-with-solrj/
>
> Best,
> Erick
>
>
> On Fri, Nov 15, 2013 at 2:48 AM, Dileepa Jayakody <
> dileepajayakody@gmail.com
> > wrote:
>
> > Hi All,
> >
> > I have written a custom update request handler to do some custom
> processing
> > of documents and configured the /update handler to use my custom handler
> in
> > the default: update.chain.
> >
> > The same requestHandler should be configured for the data-import-handler
> > when it loads documents to solr index.
> > Is there a way configure the dataimport handler to use my custom
> > updatehandler in a update.chain?
> >
> > If not how can I perform the required custom processing of the document
> > while importing data from a mysql database?
> >
> > Thanks,
> > Dileepa
> >
>

Re: An UpdateHandler to run following a MySql DataImport

Posted by Erick Erickson <er...@gmail.com>.
Hmmm, don't quite know the answer to that, but when things
start getting complex with DIH, you should seriously consider
a SolrJ solution unless someone comes up with a quick fix.
Here's an example.

http://searchhub.org/2012/02/14/indexing-with-solrj/

Best,
Erick


On Fri, Nov 15, 2013 at 2:48 AM, Dileepa Jayakody <dileepajayakody@gmail.com
> wrote:

> Hi All,
>
> I have written a custom update request handler to do some custom processing
> of documents and configured the /update handler to use my custom handler in
> the default: update.chain.
>
> The same requestHandler should be configured for the data-import-handler
> when it loads documents to solr index.
> Is there a way configure the dataimport handler to use my custom
> updatehandler in a update.chain?
>
> If not how can I perform the required custom processing of the document
> while importing data from a mysql database?
>
> Thanks,
> Dileepa
>