On 7/23/07, Nuno Leitao <[EMAIL PROTECTED]> wrote:
I would like to be able to compute and store the MD5 sum for a given
text in a field (in my case, I am talking about a URL string). For
example, if I have a field called 'url' the following would happen:

'http://wiki.apache.org' -> 'cb4f7e6ca1a0c00b146894b75d9f98dc'

First, what are you trying to achieve by this?  If you give people the
higher level problem, they might be able to suggest a better way.

Since you construct the XML document to send to Solr,
simply compute the MD5 and add that also:

<field name="url">http://wiki.apache.org</field>
<field name="urlMD5">cb4f7e6ca1a0c00b146894b75d9f98dc</field>

Or did you want to store the MD5 instead of the URL?  Did you want it
searchable somehow?

-Yonik

Reply via email to