: thanks to Hoss & Yonik for your support, attached is the BinaryField
: implementation if anyone else is interested.

I'm glad it worked out for you Ben ... if you are interested in
contributing this code to Apache so that it can be included in the main
Solr code base, can you open a Jira "New Feature" issue and attach this?
... make sure to check the "Grant license to ASF for inclusion in ASF
works" radio button.

One question though -- i haven't had a chance to try your code out, but
looking at this bit below, it seems like you can never get more then the
first 10 base64 encoded characters of the value back out -- so i'm not
clear on why you want want to store the binary value in the first place?

:       public String toExternal(Fieldable f) {
:               String extFormat = null;
:               log.info("f.isBinary()=" + f.isBinary());
:               if (f.isBinary()) {
:                       extFormat = new String(new
: Base64().encode(f.binaryValue()));
:               }
:               else {
:                       extFormat = f.stringValue();
:               }
:               log.info("extFormat.length()=" + extFormat.length());
:               // show only a segment
:               if (extFormat.length() > 10)
:                       extFormat = extFormat.substring(0, 10);
:               extFormat = "*** BinaryField " + extFormat + "
: BinaryField ***";
:               return extFormat;
:       }



-Hoss

Reply via email to