Out of curiosity, where did you get your example code from - so we can
assure that it gets corrected?

Here's a valid example, from de-dupe:

<requestHandler name="/update" class="solr.UpdateRequestHandler" >
  <lst name="defaults">
    <str name="update.chain">dedupe</str>
  </lst>
...
</requestHandler>

Note it is the request handler for "/update", not the "update handler."

See:
https://cwiki.apache.org/confluence/display/solr/De-Duplication

It is unfortunate that such an example is not given in the actual update
request processor doc, which only shows an example for the Solr Cell
request handler:
https://cwiki.apache.org/confluence/display/solr/Update+Request+Processors

If that still doesn't work, be sure to provide detail of what the symptom
is rather than simply saying that it doesn't work.


-- Jack Krupansky

On Wed, Jan 6, 2016 at 8:43 AM, marotosg <marot...@gmail.com> wrote:

> Hi,
>
> I am trying to add a new field to my schema to add the number of items of a
> multivalued field.
> I am using solr 4.11
>
> These are my fields on *schema.xml*
> <field name="EmailListS" type="textWildcardSearch" indexed="true"
> multiValued="true" stored="true" />
> <field name="EmailListCountD" type="int" indexed="true"  stored="true" />
>
> Here is the update done to my *solrconfig.xml*. I created an
> updateRequestProcessorChain
> and add it to the update handler
>
> <updateHandler class="solr.DirectUpdateHandler2">
>         <lst name="defaults">
>                 <str name="update.chain">countfields</str>
>         </lst>
> </updateHandler>
>
> <updateRequestProcessorChain name="countfields">
>    <processor class="solr.CloneFieldUpdateProcessorFactory">
>      <str name="source">EmailListS</str>
>      <str name="dest">EmailListCountD</str>
>    </processor>
>    <processor class="solr.CountFieldValuesUpdateProcessorFactory">
>      <str name="fieldName">EmailListCountD</str>
>    </processor>
>    <processor class="solr.DefaultValueUpdateProcessorFactory">
>      <str name="fieldName">EmailListCountD</str>
>      <int name="value">0</int>
>    </processor>
>    <processor class="solr.LogUpdateProcessorFactory" />
>    <processor class="solr.RunUpdateProcessorFactory" />
>  </updateRequestProcessorChain>
>
> Am I doing somwthing wrong here?
>
> Thanks for your help.
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Count-multivalued-field-issue-tp4248878.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to