lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eyal Post" <eyalp...@epocalipse.com>
Subject RE: Compression Implementation
Date Tue, 16 May 2006 17:27:46 GMT
Here's my first go at implementing this. Attached are 2 zip files (Is there
a better way to introduce patches? I'm not really familiar with the Apache
way of doing things...)

1. Index.zip - contains 2 changed files from Lucene.Net\Index folder and 1
new file. CompressionSupport.cs is the new file and it contains the code to
dynamically create the compression adapter on it's first use.
2. SharpZipLibAdapter.zip - contains the code for the adapter for the
SharpZipLib library. This should be compiled into it's own assembly.

To make Lucene.Net work with this adapter, do the following:
1. Compile Lucene.Net with the changed files.
2. Compile SharpZipLibAdapter.cs in it's own assembly (name it
SharpZipLibAdapter.dll) and deploy it with Lucene
3. In your app.config or web.config, add the following:

  <appSettings>
    <add key="Lucene.Net.CompressionLib.class"
value="Lucene.Net.Index.Compression.SharpZipLibAdapter, SharpZipLibAdapter"
/>
  </appSettings>

I made 2 tests to see if this works:
1. Create an index with compressed fields from a Java application and try to
read it with Lucene.Net.
2. Create an index with compressed fields from a Lucene.Net application and
try to read it from a Java application.
Both tests worked.

Eyal

> -----Original Message-----
> From: George Aroush [mailto:george@aroush.net] 
> Sent: Monday, May 15, 2006 23:48 PM
> To: lucene-net-dev@incubator.apache.org
> Subject: RE: Compression Implementation
> 
> Hi Eyal,
> 
> First thanks for taking on this task, it's much appreciated.
> 
> The reason why I believe we need a reflection base solution 
> is because the current code of Lucene.Net must remain 
> independent of 3rd party requirement.
> For example, if you look at the Test code for Lucene.Net, you 
> can't compile or run it without having NUnit be installed on 
> your machine and have the code reference the library.  If 
> your solution will have similar requirement, then I don't 
> think we can accept it for 1.9.
> 
> Reflection seems to me is the only way to save this problem.
> 
> After putting together the reflection code in Lucene.Net's 
> code base, we still have to provide an interface which a user 
> much code to in order for the compression code to be in a 
> working order and utilized by Lucene.Net.
> But this code, because it's not a physical part of 
> Lucene.Net, it doesn't put any restriction on Lucene.Net to 
> require a 3rd party library/code to be present to use 
> Lucene.Net -- unless if the user wants compression.
> 
> Again, thanks for taking on this task.
> 
> Regards,
> 
> -- George Aroush
> 
> -----Original Message-----
> From: Eyal Post [mailto:eyalpost@epocalipse.com]
> Sent: Monday, May 15, 2006 4:24 PM
> To: lucene-net-dev@incubator.apache.org
> Subject: RE: Compression Implementation
> 
> I'm on it. 
> Just wondering, why take the reflection way and not the interface way?
> Interface way seems more "correct" and will also perform better. 
> 
> Eyal 
>  
> 
> > -----Original Message-----
> > From: George Aroush [mailto:george@aroush.net]
> > Sent: Monday, May 15, 2006 21:54 PM
> > To: lucene-net-dev@incubator.apache.org
> > Subject: RE: Compression Implementation
> > 
> > Hi Jeff,
> > 
> > We need compression support in Lucene.Net 1.9 using .NET 
> 1.1 otherwise
> > 1.9 can't be declared compatible with it's Java based 
> index.  Beside, 
> > doing reflection to provide a plug-in solution to a 3rd party 
> > compression isn't hard.
> > 
> > Eyal already asked if he can work on this part.  I said yes 
> but I have 
> > not heard back from him yet.
> > 
> > Eyal: If you are reading this, please let us know if you 
> are taking on 
> > this task or not.  Thanks!
> > 
> > Regards,
> > 
> > -- George Aroush
> > 
> > -----Original Message-----
> > From: Jeff Rodenburg [mailto:jeff.rodenburg@gmail.com]
> > Sent: Monday, May 15, 2006 12:32 PM
> > To: lucene-net-dev@incubator.apache.org
> > Subject: Re: Compression Implementation
> > 
> > Looking at this from a bit broader perspective, this opens 
> up a bigger 
> > conversation.
> > 
> > While working to implement a third-party hook-by-reflection process 
> > into the code, the .NET 2.0 framework already contains the 
> appropriate 
> > classes to handle compression.
> > While there's a need for .NET 1.1 compliance, doing so with a 
> > round-about method seems more like an exception approach vs.
> > a standard approach.
> > 
> > I don't mean to suggest that usage for the 1.1 Framework be 
> abandoned; 
> > I'm sure there is greater 1.1 usage out in the world as opposed to 
> > 2.0.
> > However, jumping through hoops to support 1.1 is also just 
> a stopgap.  
> > I know there is a plan to move to the 2.0 Framework later 
> on when the 
> > java-based Lucene project hits its 2.0 definition.
> > 
> > Would it be worthwhile to consider a side-by-side port to the 
> > 2.0Framework?
> > I ported
> > 1.4.3 to the 2.0 Framework myself last winter, and it has changed a 
> > few underlying things as well as improved several core classes.
> > Having used the 2.0 Framework for the past 6 months, I 
> would strongly 
> > suggest we consider this as a possible solution.
> > 
> > Thoughts?
> > 
> > -- j
> > 
> > On 5/11/06, George Aroush <george@aroush.net> wrote:
> > >
> > > Hi Johnny,
> > >
> > > I have to keep Lucene.Net 1.9 .NET 1.1 compliant.  Since .NET 1.1 
> > > doesn't have compression API, I couldn't implement this
> > port -- thus,
> > > I left it out.
> > >
> > > My idea on how to resolve this is to use reflection and through 
> > > reflection, one can integrate a 3rd party compression into
> > Lucene.Net
> > > 1.9.  If you want to take on this part, please do and submit your 
> > > code.  Your effort will be more then welcome and is a path
> > to becoming
> > > a committer for Lucene.Net.
> > >
> > > Regards,
> > >
> > > -- George Aroush
> > >
> > > -----Original Message-----
> > > From: J C [mailto:roamingcode@hotmail.com]
> > > Sent: Wednesday, May 10, 2006 7:51 PM
> > > To: lucene-net-dev@incubator.apache.org
> > > Subject: Compression Implementation
> > > Importance: High
> > >
> > > Hello George
> > >
> > > I have found this:
> > > // {{Aroush-1.9}} for .NET 1.1, we can use reflection and ZLib?
> > > in FieldsWriter.cs. It seems that the ZIP compression is not yet 
> > > implemented.
> > >
> > > I would like to give it a try. Please confirm.
> > >
> > > Regards
> > > Johnny
> > >
> > > _________________________________________________________________
> > > Be the one of the first to try the NEW Windows Live Mail.
> > >
> > > 
> > 
> http://ideas.live.com/programPage.aspx?versionId=5d21c51a-b161-4314-9b
> > > 0e-491
> > > 1fb2b2e6d
> > >
> > >
> > 
> > 
> > 
> 
> 
> 

Mime
View raw message