You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Lokeya <lo...@gmail.com> on 2007/04/12 02:16:12 UTC
OutOfMemory Error while searching Index - Help Appreciated.
I have gone through the mailing list in search of posts for this error.
Though there are many, I feel my problem is little different from that and
like to get some advice on this.
Details:
1. Using a machine with RAM 2GB
2. Created an Index of size 200 MB.
3. Trying to do a search on this for certain fields.
4. Retrieves Hits with 22 documents(each doc size is around 1KB in size).[I
have issue with the results returned and I have posted that already].
5. I use a for loop like below to retrieve the Hits documents as below which
throws a OutOfMemory Error, and how I am saying the for loop only throws
error because when i comment the following code there is no error:
for (int i = 0; i < hits.length(); i++)
{
Document hitDoc = hits.doc(i);
System.out.println("Valuee Title ---------------> "+hitDoc.get("Title"));
System.out.println("Valuee Desc --------------->
"+hitDoc.get("Description"));
}
Thanks in advance.
--
View this message in context: http://www.nabble.com/OutOfMemory-Error-while-searching-Index---Help-Appreciated.-tf3562699.html#a9950831
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
Re: OutOfMemory Error while searching Index - Help Appreciated.
Posted by Lokeya <lo...@gmail.com>.
It is using the default size allocated by the OS, which I don't have any
idea how much exactly. But when I use the -Xmx1024m and run this is not
occuring. Also I make some change in that loop now keeping only the Document
hitDoc = hits.doc(i); line and thats where it starts throwing error. But I
am not very sure why this should throw and error.
Erick Erickson wrote:
>
> That certainly seems odd. How much memory are you allocating
> your JVM?
>
> Erick
>
> On 4/11/07, Lokeya <lo...@gmail.com> wrote:
>>
>>
>> I have gone through the mailing list in search of posts for this error.
>> Though there are many, I feel my problem is little different from that
>> and
>> like to get some advice on this.
>>
>> Details:
>> 1. Using a machine with RAM 2GB
>> 2. Created an Index of size 200 MB.
>> 3. Trying to do a search on this for certain fields.
>> 4. Retrieves Hits with 22 documents(each doc size is around 1KB in
>> size).[I
>> have issue with the results returned and I have posted that already].
>> 5. I use a for loop like below to retrieve the Hits documents as below
>> which
>> throws a OutOfMemory Error, and how I am saying the for loop only throws
>> error because when i comment the following code there is no error:
>>
>> for (int i = 0; i < hits.length(); i++)
>> {
>> Document hitDoc = hits.doc(i);
>> System.out.println("Valuee Title --------------->
>> "+hitDoc.get("Title"));
>> System.out.println("Valuee Desc --------------->
>> "+hitDoc.get("Description"));
>> }
>>
>> Thanks in advance.
>> --
>> View this message in context:
>> http://www.nabble.com/OutOfMemory-Error-while-searching-Index---Help-Appreciated.-tf3562699.html#a9950831
>> 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
>>
>>
>
>
--
View this message in context: http://www.nabble.com/OutOfMemory-Error-while-searching-Index---Help-Appreciated.-tf3562699.html#a9951856
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
Re: OutOfMemory Error while searching Index - Help Appreciated.
Posted by Erick Erickson <er...@gmail.com>.
That certainly seems odd. How much memory are you allocating
your JVM?
Erick
On 4/11/07, Lokeya <lo...@gmail.com> wrote:
>
>
> I have gone through the mailing list in search of posts for this error.
> Though there are many, I feel my problem is little different from that and
> like to get some advice on this.
>
> Details:
> 1. Using a machine with RAM 2GB
> 2. Created an Index of size 200 MB.
> 3. Trying to do a search on this for certain fields.
> 4. Retrieves Hits with 22 documents(each doc size is around 1KB in
> size).[I
> have issue with the results returned and I have posted that already].
> 5. I use a for loop like below to retrieve the Hits documents as below
> which
> throws a OutOfMemory Error, and how I am saying the for loop only throws
> error because when i comment the following code there is no error:
>
> for (int i = 0; i < hits.length(); i++)
> {
> Document hitDoc = hits.doc(i);
> System.out.println("Valuee Title --------------->
> "+hitDoc.get("Title"));
> System.out.println("Valuee Desc --------------->
> "+hitDoc.get("Description"));
> }
>
> Thanks in advance.
> --
> View this message in context:
> http://www.nabble.com/OutOfMemory-Error-while-searching-Index---Help-Appreciated.-tf3562699.html#a9950831
> 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
>
>