Question: I want to grab some data from lucene index file. But I can't read it.

I try to use `Luke`, but it always crashes with `java.lang.OutOfMemoryError: Java heap space`. Note `-Xmx` can't help me. I try -Xmx512, -Xmx1024 and even -Xmx2048.

I try to use `Solr` also, but gets `java.lang.OutOfMemoryError: Java heap space` too.

Any ideas how I can extract some data from Lucene?

P. S. I use lucene 2.3.0. My index file is 1.8 Gb size.

Answer: 
IN your array declaration 

```
var count_review= new Array() 

```

instead of this use

```
var count_review={}; 

```

It Works!
If your array uses a `string` key value, instead of an `int`, stringify ignores that value.

```
var array = [];
array['name'] = 'johan';
array['age'] = 20;
alert(JSON.stringify(array))// return []

```

But if array uses an "int" as a key, then `stringify` will return it.

```
var array = [];
array[0] = 'johan';
array[1] = 20;
alert(JSON.stringify(array))// return["johan",20]

```