[infinispan-dev] Infinispan Query API simplification

Tristan Tarrant ttarrant at redhat.com
Thu Apr 20 08:08:36 EDT 2017


Querying an Infinispan cache is currently a bit cumbersome. There are 
two paths:

Ickle:
Search.getQueryFactory(cache).create("...").list();

DSL (one possible example):
Search.getQueryFactory(cache).from(class).[filters].build().list();

Ideally we should have something like:

Ickle:
cache.query("...").list();

DSL:
cache.query(class).[filters].list();

Additionally, the query module is separate from infinispan-core. While 
this made sense when we didn't have non-indexed query capabilities (and 
is somewhat mitigated by the uberjars), I feel that query should be a 
1st class citizen API-wise.
For this reason I propose that we extract the query API to 
infinispan-commons,  put the query SPI in infinispan-core together with 
the non-indexed implementation and have the hibernate-search backend as 
a pluggable implementation.

Thoughts ?

Tristan

-- 
Tristan Tarrant
Infinispan Lead
JBoss, a division of Red Hat


More information about the infinispan-dev mailing list