lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Binoy Dalal <binoydala...@gmail.com>
Subject Re: Count multivalued field issue
Date Wed, 06 Jan 2016 14:34:43 GMT
You haven't given any name to your update handler. How are you planning to
call it?

On Wed, 6 Jan 2016, 19:41 GW <thegeoforce@gmail.com> wrote:

> When dealing with Solr data you need to decide whether or not to go
> programming.
>
> when I want to count a multi-value I go programming.
>
>
> $count = array_count($array);
>
>
>
> On 6 January 2016 at 08:43, marotosg <marotosg@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.
> >
>
-- 
Regards,
Binoy Dalal

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message