Created 06-04-2016 12:02 AM
I have a SOAP web service setup to annotate text using UIMA-nlp, how would I be able to use updateRequestProcessorChain to call this web service?
Thanks,
David
Created 06-04-2016 01:20 AM
I believe that would be pretty straight forward.
1) Write your SOAP client
2) Integrate it a custom class which extends UpdaterequestFactory in the processAdd(AddUpdateCommand) method.
3) Create your updateRequestProcessorChain in the solrconfig.xml
4) Add the chain to a requestHandler
Look at the example here for the ConditionalCopyProcessorFactory but just make your SOAP call instead.: https://wiki.apache.org/solr/UpdateRequestProcessor
In the processAdd, since you have access to the SolrInputDocument, you can get any field's value and you can also add a new field or child document, which is just another SolrInputDocument.
Be aware that by doing this you could add a bottleneck to your update pipeline if the web service is slow or down and you could also add additional stress on the Solr server, which perhaps is also serving queries. It just depends on your load and other factors. Alternatively, you could annotate the SolrDocuments in your ingest pipeline, before they are sent to Solr to push the load elsewhere. If you have no control over the ingest pipeline, you may have to do it in the update request chain anyway.
Created 06-04-2016 01:20 AM
I believe that would be pretty straight forward.
1) Write your SOAP client
2) Integrate it a custom class which extends UpdaterequestFactory in the processAdd(AddUpdateCommand) method.
3) Create your updateRequestProcessorChain in the solrconfig.xml
4) Add the chain to a requestHandler
Look at the example here for the ConditionalCopyProcessorFactory but just make your SOAP call instead.: https://wiki.apache.org/solr/UpdateRequestProcessor
In the processAdd, since you have access to the SolrInputDocument, you can get any field's value and you can also add a new field or child document, which is just another SolrInputDocument.
Be aware that by doing this you could add a bottleneck to your update pipeline if the web service is slow or down and you could also add additional stress on the Solr server, which perhaps is also serving queries. It just depends on your load and other factors. Alternatively, you could annotate the SolrDocuments in your ingest pipeline, before they are sent to Solr to push the load elsewhere. If you have no control over the ingest pipeline, you may have to do it in the update request chain anyway.
Created 06-08-2016 12:41 PM
@David Lam did this work for you?