RediSearch / JRediSearch

Java Client for RediSearch
https://redisearch.io
BSD 2-Clause "Simplified" License
141 stars 62 forks source link

Using Chinese query plus summarize syntax, the characters are garbled:� #196

Open yangliu0109 opened 4 months ago

yangliu0109 commented 4 months ago

=====================================code============================================

        Client redisSearchClient = new Client("ai_text", "127.0.0.1", 6379);
        Query query = new Query("测试");
        query.summarizeFields("F_Title", "F_Content");
        query.setLanguage("chinese");
        SearchResult search = redisSearchClient.search(query);
        System.out.println(search.docs.get(0).getString("F_Title"))

====================================consloe print==========================================

测试�...

=====================================env============================================

redislabs/redisearch:2.8.8 jredisearch:2.2.0

bsbodden commented 4 months ago

@yangliu0109 you should use Jedis https://github.com/redis/jedis which replaces this (now deprecated library). Please try with Jedis first (https://github.com/redis/jedis/blob/master/docs/redisearch.md) and if you still have the same problem, open an issue in Jedis' repository.

yangliu0109 commented 4 months ago

I replaced it with Jedis: version 5.1.2 and it still appeared . I think I should go to the Jedis library and ask. Thank you and I wish you a happy day🎈