RE: Using Sort

2010-04-29 Thread Uwe Schindler
://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Sirish Vadala [mailto:sirishre...@gmail.com] > Sent: Thursday, April 29, 2010 8:09 PM > To: java-user@lucene.apache.org > Subject: Using Sort > > > I have a requirement where in the results have to

Using Sort

2010-04-29 Thread Sirish Vadala
way to get this to work. Thanks. -- View this message in context: http://lucene.472066.n3.nabble.com/Using-Sort-tp765845p765845.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. - To unsubscribe, e-mail

Re: OutOfMemoryError when using Sort

2009-11-12 Thread Nuno Seco
ww.thetaphi.de eMail: u...@thetaphi.de -Original Message- From: Nuno Seco [mailto:ns...@dei.uc.pt] Sent: Thursday, November 12, 2009 6:08 PM To: java-user@lucene.apache.org Subject: Re: OutOfMemoryError when using Sort Ok. Thanks. The doc. says: "Finds the top |n| hits for |que

RE: OutOfMemoryError when using Sort

2009-11-12 Thread Uwe Schindler
gt; Subject: Re: OutOfMemoryError when using Sort > > Ok. Thanks. > > The doc. says: > "Finds the top |n| hits for |query|, applying |filter| if non-null, and > sorting the hits by the criteria in |sort|." > > I understood that only the hits (50 in this) for the c

Re: OutOfMemoryError when using Sort

2009-11-12 Thread Jake Mannix
It is only sorting the top 50 hits, yes, but do do that, it needs to look at the *value* of the field for each and every of the billions of documents. You can do this without using memory if you're willing to deal with disk seeks, but doing billions of those are going to mean that this query most

Re: OutOfMemoryError when using Sort

2009-11-12 Thread Nuno Seco
Ok. Thanks. The doc. says: "Finds the top |n| hits for |query|, applying |filter| if non-null, and sorting the hits by the criteria in |sort|." I understood that only the hits (50 in this) for the current search would be sorted... I'll just do the ordering afterwards. Thank you for clarifyin

Re: OutOfMemoryError when using Sort

2009-11-12 Thread Jake Mannix
Sorting utilizes a FieldCache: the forward lookup - the value a document has for a particular field (as opposed to the usual "inverted" way of looking at all documents which contains a given term), which lives in memory, and takes up as much space as one 4-bytes * numDocs. If you've indexed the en

RE: OutOfMemoryError when using Sort

2009-11-12 Thread Uwe Schindler
nal Message- > From: Nuno Seco [mailto:ns...@dei.uc.pt] > Sent: Thursday, November 12, 2009 4:58 PM > To: java-user@lucene.apache.org > Subject: OutOfMemoryError when using Sort > > Hello List. > > I'm having a problem when I add a Sort object to my search

OutOfMemoryError when using Sort

2009-11-12 Thread Nuno Seco
Hello List. I'm having a problem when I add a Sort object to my searcher: docs = searcher.search(parser.parse(search), null, 50, sort); Every time I execute a query I get an OutOfMemoryError exception. But if I execute the query without the Sort object it works fine Let me briefly explain ho