Re: Restrict values in a multivalued field

2008-01-16 Thread Chris Hostetter

: In my schema I have a multivalued field, and the values of that field are
: stored and indexed in the index. I wanted to know if its possible to
: restrict the number of multiple values being returned from that field, on a
: search? And how? Because, lets say, if I have thousands of values in that
: multivalued field, returning all of them would be a lot of load on the
: system. So, I want to restrict it to send me only say, 50 values out of the
: thousands.

How would Solr pick which 50 to return?
Why not index all thousand (so you can search on them) in an unstored 
field, and only store the 50 you want returned in a seperate (unindexed 
field).  the index size will be exactly the same -- admittedly you'll have 
to send a bit more data over the wire for each doc you index, but that's 
probably a trivial amount (assuming the 50 values you want to store are 
representative of the thousands you index you are talking about at most 
a 5% increases in the amount of data you send solr on each add)





-Hoss



Restrict values in a multivalued field

2008-01-12 Thread Rishabh Joshi
Hi,

In my schema I have a multivalued field, and the values of that field are
stored and indexed in the index. I wanted to know if its possible to
restrict the number of multiple values being returned from that field, on a
search? And how? Because, lets say, if I have thousands of values in that
multivalued field, returning all of them would be a lot of load on the
system. So, I want to restrict it to send me only say, 50 values out of the
thousands.

Regards,
Rishabh


Re: Restrict values in a multivalued field

2008-01-12 Thread Otis Gospodnetic
I don't have the answer to this one other than the process it yourself in your 
app.  But should anyone decide to work on this, I have another similar 
suggestion/request: return N *unique* values from a multivalued field sorted by 
their count.

The use case for this is a tagging system like simpy.com where multiple people 
can tag an entity with the same tags, and while you would want to store/index 
multiple copies for TF purposes, you really don't want to display multiple 
copies of the same tag.

Simpy currently does this manually, for example that happens here: 
http://www.simpy.com/links/search/solr ... and I'm not convinced this belongs 
to Solr.

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch

- Original Message 
From: Rishabh Joshi [EMAIL PROTECTED]
To: solr-user@lucene.apache.org
Sent: Saturday, January 12, 2008 10:55:32 AM
Subject: Restrict values in a multivalued field

Hi,

In my schema I have a multivalued field, and the values of that field
 are
stored and indexed in the index. I wanted to know if its possible
 to
restrict the number of multiple values being returned from that field,
 on a
search? And how? Because, lets say, if I have thousands of values in
 that
multivalued field, returning all of them would be a lot of load on the
system. So, I want to restrict it to send me only say, 50 values out of
 the
thousands.

Regards,
Rishabh