You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Alexandre Rafalovitch <ar...@gmail.com> on 2012/07/23 17:05:06 UTC

Query for records that have more than N values in a multi-valued field

Hello,

I have a multivalued field and I want to find records that have (for
example) at least 3 values in that list. Is there an easy way to do
it?

Regards,
   Alex.
Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)

Re: Query for records that have more than N values in a multi-valued field

Posted by Chris Hostetter <ho...@fucit.org>.
: I have a multivalued field and I want to find records that have (for
: example) at least 3 values in that list. Is there an easy way to do
: it?

Typically this is solved by adding another field that contains the count 
-- I thought i had already written an update processor in Solr 4.0.0-ALPHA 
that would do this, but aparently i didn't, so i'll add one in SOLR-3670


-Hoss

Re: Query for records that have more than N values in a multi-valued field

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Hello Alexandre,

Some time ago I wanted to contribute it
http://mail-archives.apache.org/mod_mbox/lucene-dev/201203.mbox/%3CCANGii8dUKAWp7MT1xQRjb5axdqPTM5r4z+YZpLFC7PTyWSqH1A@mail.gmail.com%3E


On Mon, Jul 23, 2012 at 7:05 PM, Alexandre Rafalovitch
<ar...@gmail.com>wrote:

> Hello,
>
> I have a multivalued field and I want to find records that have (for
> example) at least 3 values in that list. Is there an easy way to do
> it?
>
> Regards,
>    Alex.
> Personal blog: http://blog.outerthoughts.com/
> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
> - Time is the quality of nature that keeps events from happening all
> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
> book)
>



-- 
Sincerely yours
Mikhail Khludnev
Tech Lead
Grid Dynamics

<http://www.griddynamics.com>
 <mk...@griddynamics.com>