Many thanks.
Let me record here what I have tried.
I have viewed:
http://wiki.apache.org/solr/UpdateXmlMessages

and this github project which is suggestive:
https://github.com/industria/solrprocessors


I now have two UpdateRequestChains:

<updateRequestProcessorChain name="harvest" default="true">
      <processor class="solr.RunUpdateProcessorFactory"/>
      <processor
class="org.apache.solr.update.TopicQuestsDocumentProcessFactory">
        <str name="inputField">hello</str>
      </processor>
      <processor class="solr.LogUpdateProcessorFactory"/>
 </updateRequestProcessorChain>

and the new one (which is "harvest" without the
TopicQuestsDocumentProcessFactory):

<updateRequestProcessorChain name="partial" default="false">
      <processor class="solr.RunUpdateProcessorFactory"/>
      <processor class="solr.LogUpdateProcessorFactory"/>
</updateRequestProcessorChain>

Before I added "partial"
  <requestHandler name="/update"
                  class="solr.XmlUpdateRequestHandler">
...

"harvest" always ran using http://localhost:8983/solr as the base URL.

A goal was to use "harvest" only for "updates" and use "partial" for
partial updates.

I am now feeding partial with this code:

                                UpdateRequest ur = new UpdateRequest();
                                ur.add(document);
                                ur.setCommitWithin(1000);
                                UpdateResponse response = 
ur.process(updateServer);
where updateServer is a second SolrJ server set to
http://localhost:8983/solr/update

But, what is now happening, after I made this addition:

  <requestHandler name="/update"
                  class="solr.XmlUpdateRequestHandler">
       <lst name="defaults">
         <str name="update.chain">partial</str>
       </lst>
  </requestHandler>

dropping "partial" into /update where nothing was there before,

Now, just "partial" is running from the base URL and "harvest" is
never called, which means that I never see partial updates to validate
that part of the code.

At issue is this:

I have two "update" pathways:
One for when I am adding new documents
One for which I am performing partial updates

May I ask how I can configure my system to use "harvest" for new
documents and "partial" for when partial updates are sent in?

Many thanks
Jack


On Mon, Mar 11, 2013 at 12:23 AM, Upayavira <u...@odoko.co.uk> wrote:
> You need to refer to your chain in a RequestHandler config. Search for
> /update, duplicate that, and change the chain it points to.
>
> Upayavira
>
> On Mon, Mar 11, 2013, at 05:22 AM, Jack Park wrote:
>> With 4.1, not in cloud configuration, I have a custom response handler
>> chain which injects an additional handler for studying the documents
>> as they come in. But, when I do partial updates on those documents, I
>> don't want them to be studied again, so I created another version of
>> the same chain, but without my added feature. I named it "/partial".
>>
>> When I create an instance of SolrJ for the url <server>/solr/partial,
>> I get back this error message:
>>
>> Server at http://localhost:8983/solr/partial returned non ok
>> status:404, message:Not Found
>> {locator=2146fd50-fac9-47d5-85c0-47aaeafe177f,
>> tuples={set=99edfffe-b65c-4b5e-9436-67085ce49c9c}}
>>
>> Here is the configuration for that:
>>
>> <updateRequestProcessorChain name="/partial" default="false">
>>       <processor class="solr.RunUpdateProcessorFactory"/>
>>       <processor class="solr.LogUpdateProcessorFactory"/>
>> </updateRequestProcessorChain>
>>
>> The normal handler chain is this:
>>
>> <updateRequestProcessorChain name="harvest" default="true">
>>       <processor class="solr.RunUpdateProcessorFactory"/>
>>       <processor
>> class="org.apache.solr.update.TopicQuestsDocumentProcessFactory">
>>         <str name="inputField">hello</str>
>>       </processor>
>>       <processor class="solr.LogUpdateProcessorFactory"/>
>> </updateRequestProcessorChain>
>>
>> which runs on a SolrJ set for  http://localhost:8983/solr/
>>
>> What might I be missing?
>>
>> Many thanks
>> Jack

Reply via email to