Storing bitmaps and searching by matching to bitmask
I am trying to see if couchbase can support the following scenario, but I have not found a solution so far.
I am storing JSON documents that contain properties of chemical structures.
One of the properties is a bitfield that represent a fingerprint of the chemical structure, this allows characteristics of the structure to be captured in a compressed fixed length form.
When doing structure based searches a bitmask is generated and this needs to be AND'd with each fingerprint and all matches returned for full comparison.
I don't want to do the fingerprint matching in application code, there may be millions of structures to compare and it will simply be too slow.
Can anyone suggest a way to do this efficiently in couchbase, I have been looking at using views but I can't see how to do bitwise ANDing on HEX/base64 encoded binary values in a view/query .
Andy