lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandyg <gaddamsande...@gmail.com>
Subject Re: java.lang.OutOfMemoryError: Java heap space when sorting the fields
Date Wed, 19 Mar 2008 06:37:52 GMT

How can i do sorting on the results i get  (if already hits are there then
how to sort on the hits),instead of sorting on all the values b4 getting
results

Chris Lu wrote:
> 
> This is because sorting will load all values in that sortFirled into
> memory.
> 
> If it's an integer, you will need 4*N bytes, which is additional 52M for
> you.
> 
> There is no programatical way to increase memory size.
> 
> -- 
> Chris Lu
> -------------------------
> Instant Scalable Full-Text Search On Any Database/Application
> site: http://www.dbsight.net
> demo: http://search.dbsight.com
> Lucene Database Search in 3 minutes:
> http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes
> DBSight customer, a shopping comparison site, (anonymous per request)
> got 2.6 Million Euro funding!
> 
> 
> On Tue, Mar 18, 2008 at 6:23 AM, sandyg <gaddamsandeeps@gmail.com> wrote:
>>
>>  this is my search content
>>
>>  QueryParser parser = new QueryParser("keyword",new StandardAnalyzer());
>>  Query query = parser.parse("1");
>>
>>  Sort sort = new Sort(new SortField(sortField));
>>          Hits       hits = searcher.search(query,sort);
>>
>>  And i had huge data about 13 millions of records
>>  i am not sure y its giving outof memory exception and
>>  no exception when no sorting is done
>>  plz some one help me yar
>>
>>  and also if to increase heap space how to increase it programatically i
>> had
>>  command prompt
>>  java -Xms<initial heap size> -Xmx<maximum heap size>
>>  please.....
>>  --
>>  View this message in context:
>> http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-when-sorting-the-fields-tp16121128p16121128.html
>>  Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>  For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-when-sorting-the-fields-tp16121128p16137871.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message