[
https://issues.jboss.org/browse/ISPN-3105?page=com.atlassian.jira.plugin....
]
Manik Surtani updated ISPN-3105:
--------------------------------
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:
{code:java}
// Super-interface to Cache and RemoteCache
public interface BasicCache {
...
Set<?> runQuery(Filter f);
...
}
{code}
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.,
{code:java}
new FilterBuilder().matches("name",
"QueenElizabeth").and().greaterThan("age", 65).build();
{code}
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.,
{code:java}
public interface Cache {
...
Set<?> runLuceneQuery(LuceneQuery q);
...
}
{code}
4. Projections. We may also want to support projections. This needs thought. Again,
Hibernate Search's APIs can provide inspiration.
was:
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.
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:
{code:java}
// Super-interface to Cache and RemoteCache
public interface BasicCache {
...
Set<?> runQuery(Filter f);
...
}
{code}
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.,
{code:java}
new FilterBuilder().matches("name",
"QueenElizabeth").and().greaterThan("age", 65).build();
{code}
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.,
{code:java}
public interface Cache {
...
Set<?> runLuceneQuery(LuceneQuery q);
...
}
{code}
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