0

I'm not able to query on binary data field. I created the following field with binary field type.

<field name="binarycheck" type="binary" indexed="true" stored="true" />

Field type definition is the default one.

<fieldtype name="binary" class="solr.BinaryField"/>

I executed the following command to index into Solr.

curl 'http://localhost:4983/solr/update?commit=true' -H 'Content-type:application/json' -d '[{"id":"pd_3006","binarycheck":{"set":10101000}}]'

When I'm querying with the id field, I'm able to get the document.

enter image description here

Even I tried with `

http://'localhost':4983/solr/collection1/select?q=binarycheck:10101000&wt=json&indent=true

`

But it's not giving any result. Please help

buddy86
  • 1,434
  • 12
  • 20

1 Answers1

0

Indexing of binary fields is not currently supported in Solr, only storage, which is why your query returns nothing. See cheffe's answer to a similar question here linking to a current issue tracker about this: https://stackoverflow.com/a/32497414/5317888

Community
  • 1
  • 1
Matt Ball
  • 414
  • 3
  • 9
  • Could you please elaborate more your answer adding a little more description about the solution you provide? – abarisone Sep 10 '15 at 11:34
  • Unfortunately, there's no solution for indexing binary data. You could change the field type to string rather than binary and still send it as Base64 encoded or as a string of raw binary, which would allow Solr to index it and allow you to query it; however, this would most likely increase the storage size for the index as a draw back. – Matt Ball Sep 10 '15 at 11:54
  • Also similar to this other question: http://stackoverflow.com/questions/24845191/search-indexing-on-small-binary-fields-in-solr – xmorera Feb 06 '16 at 20:12