[JBoss JIRA] (ISPN-12269) Indexed caches and Query not properly working
by Gustavo Fernandes (Jira)
[ https://issues.redhat.com/browse/ISPN-12269?page=com.atlassian.jira.plugi... ]
Gustavo Fernandes commented on ISPN-12269:
------------------------------------------
You need to mark the entities in the protobuf declaration:
{code}
package people;
/**
* @Indexed
*/
message Person {
required string name = 1;
}
{code}
> Indexed caches and Query not properly working
> ---------------------------------------------
>
> Key: ISPN-12269
> URL: https://issues.redhat.com/browse/ISPN-12269
> Project: Infinispan
> Issue Type: Bug
> Components: Console, REST
> Affects Versions: 12.0.0.Dev02
> Reporter: Katia Aresti
> Assignee: Katia Aresti
> Priority: Major
>
> When we create a cache that can be queried and we add a protobuf schema object, if the cache is indexed a query like 'from people.Person' won't work.
> * create a protobuf schema
> {code:java}
> package people;
> message Person {
> required string name = 1;
> }{code}
>
> * create a indexed cache
> {code:java}
> {
> "distributed-cache": {
> "mode": "SYNC",
> "encoding": {
> "key": {
> "media-type": "application/x-protostream"
> },
> "value": {
> "media-type": "application/x-protostream"
> }
> },
> "transaction": {
> "mode": "NONE"
> },
> "indexing": {
> "enabled": true
> },
> "statistics": true
> }
> }{code}
>
> Add an entry
> {code:java}
> {
> "_type": "people.Person",
> "name": "katia"
> }{code}
>
> Try the query: from people.Person
>
> The outcome from the REST API
>
> h2. Query error
> Error executing search ISPN014054: Trying to execute query `from people.Person`, but no type is indexed on cache.
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 4 months