Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

Not getting the matched value with special character in redis

$
0
0

I have this data in redis

{"data":[    {"hash":[        {"key":"key1","values":[            {"field":"DVD±R/±RW","value":"Marron foncé"            },            {"field":"Two weeks","value":"Deux semaines"            }          ]        }      ]    }  ]}

and here is the code

public Cursor<Entry<String, String>> search(final String key,            final String hashKeyPatern) {        final ScanOptionsBuilder buider = new ScanOptionsBuilder();        if (StringUtils.isNotBlank(hashKeyPatern)) {            buider.match(hashKeyPatern);        }        return hashOperations.scan(key, buider.build());    }

here the key is key1and hashKeyPatern is DVD±R/±RW

But i am not getting matching result. Same code is working for other values. I guess here the problem is '±' character. I have tried the UrlEncoder with UTF-8 encoding but it is not getting the result.


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>