0

Is there a way to call one custom request handler from another in Solr. eg : i have /myhandler1 and /myhandler2 defined as custom request handlers in the solrconfig.xml. Defined like this

    <requestHandler name="/my handler1" class="solr.CSVRequestHandler">
    <lst name="defaults">
     <str name="update.chain">mylogupdate</str>
     <str name="stream.contentType">application/csv</str>
   </lst>
   </requestHandler>

and

    <requestHandler name="/myhandler2" class="solr.CSVRequestHandler">
    <lst name="defaults">
     <str name="update.chain">mylogupdate</str>
     <str name="stream.contentType">application/csv</str>
   </lst>
    </requestHandler>

is there a way to call /myhandler2 from /myhandler1. basically i want to use handler 1 to do some processing and then redirect it to another handler to do a second task.

the larger problem is this: given a line like this ,

    2012-01-04 23:11:41,450 AltQ:RCR-TRP: 101863261  

i can split this on a comma separator and get two fields. i further want the second field to be split on a space separator and i want to store these values to different fields like

val1:450

val2: altQ:RCR-TRP:

val3:101863261

and so on...

abhishek b
  • 71
  • 2
  • 9
  • You can try to use http://wiki.apache.org/solr/UpdateCSV#split and generate multiple values. It wont be different fields but single multivalued field. – Jayendra Jan 31 '13 at 07:10
  • @Jayendra it is vital that i need it to be as separate fields as i need to query on them separately. thanks anyways :) – abhishek b Feb 01 '13 at 05:31
  • it is easy to split fields in DIH, so you can check for some patch for csv and DIH combination – Jayendra Feb 01 '13 at 05:42
  • @Jayendra i did find a work around for it :) i have posted it as an answer :) thanks for your time :) – abhishek b Feb 01 '13 at 05:44

1 Answers1

0

For the benefit of the ppl .. I still haven't found a way to redirect requests handlers..but the other problem however was solved . I found a work around to it by defining my own custom processor < that extends update request processor >

http://wiki.apache.org/solr/UpdateRequestProcessor#Processor_Customization_Examples

and i used JAVA to manipulate the document !

abhishek b
  • 71
  • 2
  • 9