lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Serebrennikov <>
Subject Re: suggestions for a student project
Date Thu, 27 May 2004 21:34:32 GMT
Drew Farris wrote:

>On Thu, 2004-05-27 at 16:17, Dmitry Serebrennikov wrote:
>>How about adding binary fields capability to Lucene stored fields? This 
>>could be fun and useful, especially if there is a need for this for the 
>>project you are directly working on.
>>Myself and Doug have discussed this last week or so on this list, but I
>>haven't had time to do it and not sure when I might. It should be a
>>pretty well contained project. The proposed API can be
>>found in the messages from last week. I think we came up with a
>>pretty clean solution that would be relatively easy to add to Lucene,
>>and that will have little or no effect on the existing applications, and 
>>could enable new types of applications, such as encryption and 
>>compression of fields. At some point, perhaps even an index-wide 
>>compression system, akin to a zip file.
>I send out a patch for this soon after the original discussion (see url
>below). Was this what you'd had in mind or did I miss the point
>entirely? I'd appreciate any suggestions for improving it. 
Drew, I'm sorry I missed this. Definetely didn't mean to ignore you 
work! I just assumed that this is still undone. Oops....
I just took a look at your patch. Looks great! Simple, and does the trick.
One comment:
- I understand why getBinaryValues(String fieldName) has to return 
byte[][]. This is to deal with multiple fields with the same name, 
right? I think this is a relatively rear case, so perhaps it would be 
good to have a method getBinaryValue(String fieldName) that just returns 
the first byte[] for a given name. I think you can avoid allocating an 
array and most applications would find it more convinient.

I'm +1 for including this (provided it works and all :), I have not 
actually tested it myself).

As far as testing, I think unit tests are enough. It would be good to 
have a few tests though. One test to have as with a large amount of data.
What happens if there are two fields with the same name but one binary 
and one not? Will there be an error? If so, when will it be given?
Is it possible to set confliciting flags on a field if one does not use 
the new Field.Binary method? What happens if this is done?
Can anyone think of other things to test with this feature?

Again, Drew, great work! Thanks for your contribution to Lucene.
Sorry to have missed your original message.


>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message