[infinispan-issues] [JBoss JIRA] (ISPN-3105) Design query API for both embedded use and Java Hot Rod client
Manik Surtani (JIRA)
jira-events at lists.jboss.org
Wed May 15 11:51:06 EDT 2013
[ https://issues.jboss.org/browse/ISPN-3105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Manik Surtani updated ISPN-3105:
--------------------------------
Labels: remote-query (was: )
Priority: Major (was: Blocker)
Description:
There are several parts to this JIRA.
1. We'd need a query API to be able to run queries on a cache. For example:
{{
// Super-interface to Cache and RemoteCache
public interface BasicCache {
...
Set<?> runQuery(Filter f);
...
}
}}
such that the same API can be used for remote (for the Hot Rod Java client) as well as embedded querying.
2. Since the approach we're using is effectively to look at the global data set and apply a series of filters, we'd need a {{FilterBuilder}} as well to create such filters. E.g.,
{{
new FilterBuilder().matches("name", "QueenElizabeth").and().greaterThan("age", 65).build();
}}
The Hibernate Search query DSL could probably be used for inspiration.
3. Further, we should still have an API that takes in Lucene Query objects - as per the existing Query API - but this would be for embedded mode only. E.g.,
{{
public interface Cache {
...
Set<?> runLuceneQuery(LuceneQuery q);
...
}
}}
4. Projections. We may also want to support projections. This needs thought. Again, Hibernate Search's APIs can provide inspiration.
was:This would be the API to be replicated/exposed for the remote query as well and a subset of what we currently expose through Lucene queries. Lucene queries would still be available through a different interface.
Estimated Difficulty: Medium
> Design query API for both embedded use and Java Hot Rod client
> --------------------------------------------------------------
>
> Key: ISPN-3105
> URL: https://issues.jboss.org/browse/ISPN-3105
> Project: Infinispan
> Issue Type: Task
> Components: Querying
> Reporter: Mircea Markus
> Assignee: Adrian Nistor
> Labels: remote-query
> Fix For: 6.0.0.Alpha2, 6.0.0.Final
>
>
> There are several parts to this JIRA.
> 1. We'd need a query API to be able to run queries on a cache. For example:
> {{
> // Super-interface to Cache and RemoteCache
> public interface BasicCache {
> ...
> Set<?> runQuery(Filter f);
> ...
> }
> }}
> such that the same API can be used for remote (for the Hot Rod Java client) as well as embedded querying.
> 2. Since the approach we're using is effectively to look at the global data set and apply a series of filters, we'd need a {{FilterBuilder}} as well to create such filters. E.g.,
> {{
> new FilterBuilder().matches("name", "QueenElizabeth").and().greaterThan("age", 65).build();
> }}
> The Hibernate Search query DSL could probably be used for inspiration.
> 3. Further, we should still have an API that takes in Lucene Query objects - as per the existing Query API - but this would be for embedded mode only. E.g.,
> {{
> public interface Cache {
> ...
> Set<?> runLuceneQuery(LuceneQuery q);
> ...
> }
> }}
> 4. Projections. We may also want to support projections. This needs thought. Again, Hibernate Search's APIs can provide inspiration.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list