lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From preetesh dubey <dubeypreet...@gmail.com>
Subject Re: terms count in multivalues field
Date Sat, 09 Jun 2012 21:01:16 GMT
Thanks Jack!
Creating another field to store the count is one option. I just wanted to
know if this was possible without adding new field to schema. And I got the
answer, it's not possible atleast in solr 3.x versions.
Thanks once again for your reply and infromation about " Toolkit of
UpdateProcessors " in 4.x version.

On Sun, Jun 10, 2012 at 12:55 AM, Jack Krupansky <jack@basetechnology.com>wrote:

> I am not aware of any function query to get the value count for a
> multivalued field.
>
> You could write a custom update processor which counted the values and
> then stored the count in another field. Then you could do a numeric range
> query on that other field. Or maybe even store a boolean in another field
> to indicate whether the field had a single value or more than a threshold
> count of values, or whatever custom calculation you wanted.
>
> Of course, you could also count the values yourself and setting a separate
> count field before submitting the document to Solr.
>
> See SOLR-2802 - "Toolkit of UpdateProcessors for modifying document
> values" for some possible base classes for such an update processor. This
> is for 4.x, not 3.6. For older releases, you will have to do it all
> yourself.
> https://issues.apache.org/**jira/browse/SOLR-2802<https://issues.apache.org/jira/browse/SOLR-2802>
>
> -- Jack Krupansky
>
> -----Original Message----- From: preetesh dubey
> Sent: Friday, June 08, 2012 12:22 PM
> To: solr-user@lucene.apache.org
> Subject: terms count in multivalues field
>
>
> Is it possible to get number of entries present in a multivalued field by
> solr query. Lets say I want to query to solr to get all documents having *
> count* of some multivalued field >1. Is it possible in solr ?
>
>
> --
> Thanks & Regards
> Preetesh Dubey
>



-- 
Thanks & Regards
Preetesh Dubey

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