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 Andreas Owen <a....@gmx.net> on 2014/03/27 09:58:32 UTC

dih data-config.xml onImportEnd event

i would like to call a url after the import is finished whith the event  
<document onImportEnd="">. how can i do this?

Re: dih data-config.xml onImportEnd event

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Oops. Ignore my email. I learnt something today that I have not seen
anybody else use.

Are there live open-source examples of the DIH EventListeners?

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency


On Thu, Mar 27, 2014 at 4:11 PM, Ahmet Arslan <io...@yahoo.com> wrote:
> Hi Andres,
>
> Here is a snippet you can use for starting point.
>
> import org.apache.solr.handler.dataimport.Context;
> import org.apache.solr.handler.dataimport.EventListener;
>
> public class MyEventListener implements EventListener {
>   public void onEvent(Context ctx) {
>
>     if (Context.DELTA_DUMP.equals(ctx.currentProcess())) {
>       // do something call a URL
>     }
>
>   }
> }
>
> http://wiki.apache.org/solr/DataImportHandler#EventListeners
>
>
> Ahmet
>
>
>
> On Thursday, March 27, 2014 11:08 AM, Alexandre Rafalovitch <ar...@gmail.com> wrote:
> I don't think there is one like that.
>
> But you might be able to use a custom UpdateRequestProcessor? Or a
> postCommit hook in solrconfig.xml
>
> Regards,
>    Alex.
> Personal website: http://www.outerthoughts.com/
> Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency
>
>
>
> On Thu, Mar 27, 2014 at 3:58 PM, Andreas Owen <a....@gmx.net> wrote:
>> i would like to call a url after the import is finished whith the event
>> <document onImportEnd="">. how can i do this?
>

Re: dih data-config.xml onImportEnd event

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Andres,

Here is a snippet you can use for starting point.

import org.apache.solr.handler.dataimport.Context;
import org.apache.solr.handler.dataimport.EventListener;

public class MyEventListener implements EventListener {
  public void onEvent(Context ctx) {

    if (Context.DELTA_DUMP.equals(ctx.currentProcess())) {
      // do something call a URL
    }

  }
}

http://wiki.apache.org/solr/DataImportHandler#EventListeners


Ahmet



On Thursday, March 27, 2014 11:08 AM, Alexandre Rafalovitch <ar...@gmail.com> wrote:
I don't think there is one like that.

But you might be able to use a custom UpdateRequestProcessor? Or a
postCommit hook in solrconfig.xml

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency



On Thu, Mar 27, 2014 at 3:58 PM, Andreas Owen <a....@gmx.net> wrote:
> i would like to call a url after the import is finished whith the event
> <document onImportEnd="">. how can i do this?


Re: dih data-config.xml onImportEnd event

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
I don't think there is one like that.

But you might be able to use a custom UpdateRequestProcessor? Or a
postCommit hook in solrconfig.xml

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency


On Thu, Mar 27, 2014 at 3:58 PM, Andreas Owen <a....@gmx.net> wrote:
> i would like to call a url after the import is finished whith the event
> <document onImportEnd="">. how can i do this?