Infinispan:通过HotRod进行不敏感查询

时间:2016-03-09 14:54:40

标签: java case-insensitive infinispan querying


是否有可能通过Hotrod与Infinispan 8.1.2使用非大小写敏感查询?
例如:

RemoteCacheManager remoteCacheManager = ...;
RemoteCache<Integer, Book> remoteCache = remoteCacheManager.getCache();

Book book1 = new Book();
book1.setTitle("Hibernate");
remoteCache.put(1, book1);

Book book2 = new Book();
book2.setTile("Infinispan");
remoteCache.put(2, book2);

QueryFactory qf = Search.getQueryFactory(remoteCache);
Query query = qf.from(Book.class)
  .having("title").in("infinispan").toBuilder()
  .build();

List<Book> list = query.list(); // Voila! We have our book back from the cache!

0 个答案:

没有答案
相关问题