Re: Store byte array in StoredField using zlib compression

2024-10-26 Thread Prashant Saxena
Ok, Everything has been cleared out about the problem. Please let me know how to get this *from org.apache.lucene.codecs.lucene100 import Lucene100Codec* *print(Lucene100Codec.Mode.BEST_COMPRESSION)* Error AttributeError: type object 'Lucene100Codec$Mode' has no attribute 'BEST_COMPRESSION' I n

Re: Store byte array in StoredField using zlib compression

2024-10-26 Thread Prashant Saxena
There must be an explanation about 83 MB of compressed data getting almost double of its size. It doesn't make sense at all. On Sat, Oct 26, 2024 at 7:03 PM Andi Vajda wrote: > > > On Oct 26, 2024, at 14:50, Prashant Saxena > wrote: > > > > I just need to store compressed strings to save space

Re: Store byte array in StoredField using zlib compression

2024-10-26 Thread Andi Vajda
> On Oct 26, 2024, at 16:21, Prashant Saxena wrote: > > There must be an explanation about 83 MB of compressed data getting almost > double of its size. It doesn't make sense at all. When not using a JArray('byte') your python byte array is converted into a partial java string and is being c

Re: Store byte array in StoredField using zlib compression

2024-10-26 Thread Andi Vajda
> On Oct 26, 2024, at 14:50, Prashant Saxena wrote: > > I just need to store compressed strings to save space. If it can be done in > any other way, I'm OK with that. The JArray('byte') is the way. Andi.. > > >> On Sat, Oct 26, 2024 at 6:11 PM Andi Vajda wrote: >> >> >>> On Sat, 26 Oct

Re: Store byte array in StoredField using zlib compression

2024-10-26 Thread Prashant Saxena
I just need to store compressed strings to save space. If it can be done in any other way, I'm OK with that. On Sat, Oct 26, 2024 at 6:11 PM Andi Vajda wrote: > > On Sat, 26 Oct 2024, Prashant Saxena wrote: > > > PyLucene 10.0.0 > > > > I'm trying to store a long text by compressing it first us

Re: Store byte array in StoredField using zlib compression

2024-10-26 Thread Andi Vajda
On Sat, 26 Oct 2024, Prashant Saxena wrote: PyLucene 10.0.0 I'm trying to store a long text by compressing it first using zlib *doc.add(StoredField("contents", zlib.compress(ftext.encode('utf-8'* The resulting index size is *~83 MB*. When reading it's value back using *c = doc.getBinar

Store byte array in StoredField using zlib compression

2024-10-26 Thread Prashant Saxena
PyLucene 10.0.0 I'm trying to store a long text by compressing it first using zlib *doc.add(StoredField("contents", zlib.compress(ftext.encode('utf-8'* The resulting index size is *~83 MB*. When reading it's value back using *c = doc.getBinaryValue("contents")* It's returning 'NoneType' an