Open GoogleCodeExporter opened 9 years ago
Hi Sandeep, this belongs more in the forum than as an issue.
Have you tried IndexQuantization? This is a good way to reduce memory usage.
Also are your ID values sparse? If so you could write your own quantizer to
better handle sparse values, like this one:
/**
* Converts sparse double values, to a fixed number of buckets.
* <p/>
* This quantizer should only be used with equality-based indexes, such as {@code HashIndex}.
*/
public class SparseDoubleQuantizer implements Quantizer<Double> {
private final int numBuckets;
public SparseDoubleQuantizer(int numBuckets) {
this.numBuckets = numBuckets;
}
@Override
public Double getQuantizedValue(Double attributeValue) {
return (double) attributeValue.longValue() % numBuckets;
}
}
The quantizer above will restrict the size of an equality-based index (e.g.
HashIndex) to a fixed number of buckets, independent of the number of unique
values of your IDs. But it cannot be used with a NavigableIndex.
This is not the best place to answer questions. If you like post your question
in the forum http://groups.google.com/group/cqengine-discuss and we can
continue discussion there. thanks!
Original comment by ni...@npgall.com
on 15 Oct 2013 at 12:10
Original issue reported on code.google.com by
sandeepd...@gmail.com
on 15 Oct 2013 at 6:58