Save and get byte [] in Elasticsearch
I have a byte [] array. Let be -
byte[] b = new byte[] {'11', '22', '33', '44'};
      
        
        
        
      
    I want to store this array in Elasticsearch and get this byte array from elasticsearch using java. How should I do it? Please show me an example.
For example, I want to see something like this -
SearchHit hit = searchResponse.getHits().getHits();
byte[] b = (byte[]) hit.getSource().get("byte_array");
      
        
        
        
      
    But I am getting this error. Please help me
java.lang.ClassCastException: java.util.ArrayList cannot be cast to [B
      
        
        
        
      
    
+3 
Emdadul sawon 
source
to share
      No one has answered this question yet
Check out similar questions:
23498
3393
2248
2171
1823
1367
935
783
608
598