Calculate a sum.

2013-01-14 Thread stockii
hello.

My problem is, that i need to calculate a sum of amounts. this amount is in
my index (stored=true). my php script get all values with paging. but if a
request takes too long, jetty is killing this process and i get a broken
pipe.

Which is the best/fastest way to get the values of many fields from index?
exists an ResponseHandler for exports? Or which is the fastest?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Calculate-a-sum-tp4033091.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Calculate a sum.

2013-01-14 Thread Rafał Kuć
Hello!

Fetching all the documents, especially for a query that returns many
documents can be a pain.

However there is a StatsComponent
(http://wiki.apache.org/solr/StatsComponent) in Solr, however your
field would have to be numeric and indexed. 

-- 
Regards,
 Rafał Kuć
 Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

 hello.

 My problem is, that i need to calculate a sum of amounts. this amount is in
 my index (stored=true). my php script get all values with paging. but if a
 request takes too long, jetty is killing this process and i get a broken
 pipe.

 Which is the best/fastest way to get the values of many fields from index?
 exists an ResponseHandler for exports? Or which is the fastest?



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Calculate-a-sum-tp4033091.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: Calculate a sum.

2013-01-14 Thread stockii
Hey, thx for your reply. 

i forgot to say. StatsComponent doesnt work with our application.
too slow and buggy. but i test with this component with version 1.4 ...
maybe some bugfixes in 4.0 ?

this is the reason for calculating the sum on client side and some pages.
but sometimes its too much for server.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Calculate-a-sum-tp4033091p4033097.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Calculate a sum.

2013-01-14 Thread Mikhail Khludnev
Stored fields are famous for its' slowness as well as they requires two io
operation per doc. You can spend some heap for uninverting the index and
utilize wiki.apache.org/solr/StatsComponent
Let us know whether it works for you.
14.01.2013 13:14 пользователь stockii stock.jo...@googlemail.com
написал:

 hello.

 My problem is, that i need to calculate a sum of amounts. this amount is in
 my index (stored=true). my php script get all values with paging. but if
 a
 request takes too long, jetty is killing this process and i get a broken
 pipe.

 Which is the best/fastest way to get the values of many fields from index?
 exists an ResponseHandler for exports? Or which is the fastest?



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Calculate-a-sum-tp4033091.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: Calculate a sum.

2013-01-14 Thread Edward Garrett
i've had perfectly fine performance with StatsComponent, but have only
tested with 50,000 documents. for example i have field syllables and
numeric field syllables_count. then i sum the syllable count for any
search query. how many documents are you working with?

On Mon, Jan 14, 2013 at 10:54 AM, Mikhail Khludnev
mkhlud...@griddynamics.com wrote:
 Stored fields are famous for its' slowness as well as they requires two io
 operation per doc. You can spend some heap for uninverting the index and
 utilize wiki.apache.org/solr/StatsComponent
 Let us know whether it works for you.
 14.01.2013 13:14 пользователь stockii stock.jo...@googlemail.com
 написал:

 hello.

 My problem is, that i need to calculate a sum of amounts. this amount is in
 my index (stored=true). my php script get all values with paging. but if
 a
 request takes too long, jetty is killing this process and i get a broken
 pipe.

 Which is the best/fastest way to get the values of many fields from index?
 exists an ResponseHandler for exports? Or which is the fastest?



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Calculate-a-sum-tp4033091.html
 Sent from the Solr - User mailing list archive at Nabble.com.




-- 
edge


Re: Calculate a sum.

2013-01-14 Thread stockii
Mikhail Khludnev wrote
 You can spend some heap for uninverting the index and 
 utilize wiki.apache.org/solr/StatsComponent

what do you mean with this?


Edward Garrett wrote
 how many documents are you working with? 

~90 million documents ...



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Calculate-a-sum-tp4033091p4033152.html
Sent from the Solr - User mailing list archive at Nabble.com.