You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Grant Ingersoll <gs...@apache.org> on 2010/12/05 21:28:59 UTC

Testing UpdateProcessorChain

Anyone have any thoughts on testing UpdateProcessorChain (and Factory).  In looking at the Signature (dedup) tests, it seems a little clunky, yet the Solr base test class adoc (and related methods) don't seem to support specifying the Update handler to hit.

Thoughts?

-Grant
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Testing UpdateProcessorChain

Posted by Grant Ingersoll <gs...@apache.org>.
On Dec 5, 2010, at 3:34 PM, Yonik Seeley wrote:

> On Sun, Dec 5, 2010 at 3:28 PM, Grant Ingersoll <gs...@apache.org> wrote:
>> Anyone have any thoughts on testing UpdateProcessorChain (and Factory).  In looking at the Signature (dedup) tests, it seems a little clunky, yet the Solr base test class adoc (and related methods) don't seem to support specifying the Update handler to hit.
> 
> You can specify an alternate update processor with any update command.
> SolrTestCaseJ4 has this:
>  public static String add(XmlDoc doc, String... args) {
> 
> so... you should be able to do something like
> add(doc("id","10"),"update.processor","foo")

Yeah, I am calling that.  I think the problem is that assertU() calls doLegacyUpdate, which doesn't handle getting the chain.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Testing UpdateProcessorChain

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Sun, Dec 5, 2010 at 3:28 PM, Grant Ingersoll <gs...@apache.org> wrote:
> Anyone have any thoughts on testing UpdateProcessorChain (and Factory).  In looking at the Signature (dedup) tests, it seems a little clunky, yet the Solr base test class adoc (and related methods) don't seem to support specifying the Update handler to hit.

You can specify an alternate update processor with any update command.
SolrTestCaseJ4 has this:
  public static String add(XmlDoc doc, String... args) {

so... you should be able to do something like
add(doc("id","10"),"update.processor","foo")

-Yonik
http://www.lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org