[JBoss JIRA] (ISPN-7842) Declarative indexed entity mapping
by Sanne Grinovero (JIRA)
[ https://issues.jboss.org/browse/ISPN-7842?page=com.atlassian.jira.plugin.... ]
Sanne Grinovero edited comment on ISPN-7842 at 5/16/17 5:34 AM:
----------------------------------------------------------------
h5. High level questions
## (?) I assume the intent that - for a given class type {{A}} - it's going to be mapped *either* via annotations *or* via explicit mapping? (I would suggest to expect that, at least for the first iterations, as we don't support integrating the two at the moment)
## (/) (follow up on previous question) I hope you'll enforce (validate) against listing the same class in both ways
## (flag) We will need to require the actual class definition to be "on classpath" during bootstrap of the Cache. I hope that's fine for the use case?
was (Author: sannegrinovero):
* High level questions
## (?) I assume the intent that - for a given class type `A` - it's going to be mapped *either* via annotations *or* via explicit mapping? (I would suggest to expect that, at least for the first iterations, as we don't support integrating the two at the moment)
## (/) (follow up on previous question) I hope you'll enforce (validate) against listing the same class in both ways
## (flag) We will need to require the actual class definition to be "on classpath" during bootstrap of the Cache. I hope that's fine for the use case?
> Declarative indexed entity mapping
> ----------------------------------
>
> Key: ISPN-7842
> URL: https://issues.jboss.org/browse/ISPN-7842
> Project: Infinispan
> Issue Type: Enhancement
> Components: Configuration, Embedded Querying
> Reporter: Tristan Tarrant
> Assignee: Jakub Senko
> Priority: Minor
>
> We need a way to list annotation-less indexed entities in the infinispan XML.
> The
> {noformat}
> <indexed-entities>
> {noformat}
> element schema will need to be extended as follows:
> {code:xml}
> <indexed-entities>
> <!-- annotated entity -->
> <indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
> <!-- non-annotated entity -->
> <indexed-entity-mapping>
> <!-- the FQN of the class to index -->
> <class>my.domain.model.Author</class>
> <!-- optional -->
> <spatial name="place" mode="HASH"/>
> <!-- list of indexed properties -->
> <property name="name" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> </property>
> <property name="title" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
> </property>
> <property type="method" name="birthdate">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> <date-bridge resolution="DAY"/>
> </property>
>
> <property type="method" name="city">
> <spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
> </property>
> </indexed-entity-mapping>
> </indexed-entities>
>
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (ISPN-7842) Declarative indexed entity mapping
by Sanne Grinovero (JIRA)
[ https://issues.jboss.org/browse/ISPN-7842?page=com.atlassian.jira.plugin.... ]
Sanne Grinovero commented on ISPN-7842:
---------------------------------------
* High level questions
## (?) I assume the intent that - for a given class type `A` - it's going to be mapped *either* via annotations *or* via explicit mapping? (I would suggest to expect that, at least for the first iterations, as we don't support integrating the two at the moment)
## (/) (follow up on previous question) I hope you'll enforce (validate) against listing the same class in both ways
## (flag) We will need to require the actual class definition to be "on classpath" during bootstrap of the Cache. I hope that's fine for the use case?
> Declarative indexed entity mapping
> ----------------------------------
>
> Key: ISPN-7842
> URL: https://issues.jboss.org/browse/ISPN-7842
> Project: Infinispan
> Issue Type: Enhancement
> Components: Configuration, Embedded Querying
> Reporter: Tristan Tarrant
> Assignee: Jakub Senko
> Priority: Minor
>
> We need a way to list annotation-less indexed entities in the infinispan XML.
> The
> {noformat}
> <indexed-entities>
> {noformat}
> element schema will need to be extended as follows:
> {code:xml}
> <indexed-entities>
> <!-- annotated entity -->
> <indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
> <!-- non-annotated entity -->
> <indexed-entity-mapping>
> <!-- the FQN of the class to index -->
> <class>my.domain.model.Author</class>
> <!-- optional -->
> <spatial name="place" mode="HASH"/>
> <!-- list of indexed properties -->
> <property name="name" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> </property>
> <property name="title" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
> </property>
> <property type="method" name="birthdate">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> <date-bridge resolution="DAY"/>
> </property>
>
> <property type="method" name="city">
> <spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
> </property>
> </indexed-entity-mapping>
> </indexed-entities>
>
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (ISPN-7842) Declarative indexed entity mapping
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-7842?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes commented on ISPN-7842:
-----------------------------------------
[~anistor] Would it work to have the indexing config for remote in the XML as well, like described here?
> Declarative indexed entity mapping
> ----------------------------------
>
> Key: ISPN-7842
> URL: https://issues.jboss.org/browse/ISPN-7842
> Project: Infinispan
> Issue Type: Enhancement
> Components: Configuration, Embedded Querying
> Reporter: Tristan Tarrant
> Assignee: Jakub Senko
> Priority: Minor
>
> We need a way to list annotation-less indexed entities in the infinispan XML.
> The
> {noformat}
> <indexed-entities>
> {noformat}
> element schema will need to be extended as follows:
> {code:xml}
> <indexed-entities>
> <!-- annotated entity -->
> <indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
> <!-- non-annotated entity -->
> <indexed-entity-mapping>
> <!-- the FQN of the class to index -->
> <class>my.domain.model.Author</class>
> <!-- optional -->
> <spatial name="place" mode="HASH"/>
> <!-- list of indexed properties -->
> <property name="name" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> </property>
> <property name="title" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
> </property>
> <property type="method" name="birthdate">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> <date-bridge resolution="DAY"/>
> </property>
>
> <property type="method" name="city">
> <spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
> </property>
> </indexed-entity-mapping>
> </indexed-entities>
>
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (ISPN-7842) Declarative indexed entity mapping
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-7842?page=com.atlassian.jira.plugin.... ]
Adrian Nistor commented on ISPN-7842:
-------------------------------------
No, not used for protobuf.
> Declarative indexed entity mapping
> ----------------------------------
>
> Key: ISPN-7842
> URL: https://issues.jboss.org/browse/ISPN-7842
> Project: Infinispan
> Issue Type: Enhancement
> Components: Configuration, Embedded Querying
> Reporter: Tristan Tarrant
> Assignee: Jakub Senko
> Priority: Minor
>
> We need a way to list annotation-less indexed entities in the infinispan XML.
> The
> {noformat}
> <indexed-entities>
> {noformat}
> element schema will need to be extended as follows:
> {code:xml}
> <indexed-entities>
> <!-- annotated entity -->
> <indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
> <!-- non-annotated entity -->
> <indexed-entity-mapping>
> <!-- the FQN of the class to index -->
> <class>my.domain.model.Author</class>
> <!-- optional -->
> <spatial name="place" mode="HASH"/>
> <!-- list of indexed properties -->
> <property name="name" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> </property>
> <property name="title" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
> </property>
> <property type="method" name="birthdate">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> <date-bridge resolution="DAY"/>
> </property>
>
> <property type="method" name="city">
> <spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
> </property>
> </indexed-entity-mapping>
> </indexed-entities>
>
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (ISPN-7842) Declarative indexed entity mapping
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-7842?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes commented on ISPN-7842:
-----------------------------------------
[~anistor] Is <indexed-entity> being used for protobuf entities as well?
> Declarative indexed entity mapping
> ----------------------------------
>
> Key: ISPN-7842
> URL: https://issues.jboss.org/browse/ISPN-7842
> Project: Infinispan
> Issue Type: Enhancement
> Components: Configuration, Embedded Querying
> Reporter: Tristan Tarrant
> Assignee: Jakub Senko
> Priority: Minor
>
> We need a way to list annotation-less indexed entities in the infinispan XML.
> The
> {noformat}
> <indexed-entities>
> {noformat}
> element schema will need to be extended as follows:
> {code:xml}
> <indexed-entities>
> <!-- annotated entity -->
> <indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
> <!-- non-annotated entity -->
> <indexed-entity-mapping>
> <!-- the FQN of the class to index -->
> <class>my.domain.model.Author</class>
> <!-- optional -->
> <spatial name="place" mode="HASH"/>
> <!-- list of indexed properties -->
> <property name="name" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> </property>
> <property name="title" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
> </property>
> <property type="method" name="birthdate">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> <date-bridge resolution="DAY"/>
> </property>
>
> <property type="method" name="city">
> <spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
> </property>
> </indexed-entity-mapping>
> </indexed-entities>
>
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (ISPN-3795) QueryInterceptor incorrectly relies on the return value of a RemoveCommand
by Sanne Grinovero (JIRA)
[ https://issues.jboss.org/browse/ISPN-3795?page=com.atlassian.jira.plugin.... ]
Sanne Grinovero commented on ISPN-3795:
---------------------------------------
{quote}[..] After that we add transparent batching to Hibernate Search SYNC backend, plus the async indexing backend, I reckon performance is vastly superior to do batch loading nowadays.{quote}
Yes that is a solved problem, but I wonder if we'd still be fetching values from somewhere, or attempting to fetch from somewhere - even if there's no data - and block on such rpcs such as loading from a remote node or from a DB.
Granted a "batch loading" is supposedly happening on an _empty_ data grid so there shouldn't be much of a payload to fetch for existing keys, but e.g. I remember before introducing SKIP_CACHESTORE even just looking into a cachestore for each value was a performance killer.
In short I'm not worried about the indexing performance but the other costs which are typically a good reason to enable _IGNORE_RETURN_VALUE_ . I guess I might be too paranoid: if I'm wrong and the core team sees no such costs anymore then I'm happy to simply remove this. Let's just not forget to perf test for this.
> QueryInterceptor incorrectly relies on the return value of a RemoveCommand
> --------------------------------------------------------------------------
>
> Key: ISPN-3795
> URL: https://issues.jboss.org/browse/ISPN-3795
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 6.0.0.Final
> Reporter: Dan Berindei
> Assignee: Gustavo Fernandes
>
> QueryInterceptor uses the return value from RemoveCommand/ReplaceCommand to remove the value from the index.
> But both RemoveCommand and ReplaceCommand have a variant with an expected value parameter, and this variant return a boolean value instead of the removed/replaced value. In that case, the previous value won't be removed from the index.
> QueryInterceptor should probably use the previous value from the context entries to update the index instead.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (ISPN-7842) Declarative indexed entity mapping
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-7842?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-7842:
----------------------------------
Description:
We need a way to list annotation-less indexed entities in the infinispan XML.
The
{noformat}
<indexed-entities>
{noformat}
element schema will need to be extended as follows:
{code:xml}
<indexed-entities>
<!-- annotated entity -->
<indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
<!-- non-annotated entity -->
<indexed-entity-mapping>
<!-- the FQN of the class to index -->
<class>my.domain.model.Author</class>
<!-- optional -->
<spatial name="place" mode="HASH"/>
<!-- list of indexed properties -->
<property name="name" type="method">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
</property>
<property name="title" type="method">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
</property>
<property type="method" name="birthdate">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
<date-bridge resolution="DAY"/>
</property>
<property type="method" name="city">
<spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
</property>
</indexed-entity-mapping>
</indexed-entities>
{code}
was:
We need a way to list annotation-less indexed entities in the infinispan XML.
The
{noformat}
<indexed-entities>
{noformat}
element schema will need to be extended as follows:
{code:xml}
<indexing index="ALL">
<indexed-entities>
<!-- annotated entity -->
<indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
<!-- non-annotated entity -->
<indexed-entity-mapping>
<!-- the FQN of the class to index -->
<class>my.domain.model.Author</class>
<!-- optional -->
<spatial name="place" mode="HASH"/>
<!-- list of indexed properties -->
<property name="name" type="method">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
</property>
<property name="title" type="method">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
</property>
<property type="method" name="birthdate">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
<date-bridge resolution="DAY"/>
</property>
<property type="method" name="city">
<spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
</property>
</indexed-entity-mapping>
</indexed-entities>
<!-- Use our custom IndexManager; TODO autoinject by default? -->
<property name="hibernate.search.default.indexmanager">org.infinispan.query.indexmanager.InfinispanIndexManager</property>
<property name="hibernate.search.indexing_strategy">manual</property>
<!-- Use latest Lucene version -->
<property name="lucene_version">LUCENE_CURRENT</property>
</indexing>
{code}
> Declarative indexed entity mapping
> ----------------------------------
>
> Key: ISPN-7842
> URL: https://issues.jboss.org/browse/ISPN-7842
> Project: Infinispan
> Issue Type: Enhancement
> Components: Configuration, Embedded Querying
> Reporter: Tristan Tarrant
> Assignee: Jakub Senko
> Priority: Minor
>
> We need a way to list annotation-less indexed entities in the infinispan XML.
> The
> {noformat}
> <indexed-entities>
> {noformat}
> element schema will need to be extended as follows:
> {code:xml}
> <indexed-entities>
> <!-- annotated entity -->
> <indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
> <!-- non-annotated entity -->
> <indexed-entity-mapping>
> <!-- the FQN of the class to index -->
> <class>my.domain.model.Author</class>
> <!-- optional -->
> <spatial name="place" mode="HASH"/>
> <!-- list of indexed properties -->
> <property name="name" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> </property>
> <property name="title" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
> </property>
> <property type="method" name="birthdate">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> <date-bridge resolution="DAY"/>
> </property>
>
> <property type="method" name="city">
> <spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
> </property>
> </indexed-entity-mapping>
> </indexed-entities>
>
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (ISPN-7842) Declarative indexed entity mapping
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-7842?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-7842:
----------------------------------
Description:
We need a way to list annotation-less indexed entities in the infinispan XML.
The
{noformat}
<indexed-entities>
{noformat}
element schema will need to be extended as follows:
{code:xml}
<indexing index="ALL">
<indexed-entities>
<!-- annotated entity -->
<indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
<!-- non-annotated entity -->
<indexed-entity-mapping>
<!-- the FQN of the class to index -->
<class>my.domain.model.Author</class>
<!-- optional -->
<spatial name="place" mode="HASH"/>
<!-- list of indexed properties -->
<property name="name" type="method">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
</property>
<property name="title" type="method">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
</property>
<property type="method" name="birthdate">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
<date-bridge resolution="DAY"/>
</property>
<property type="method" name="city">
<spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
</property>
</indexed-entity-mapping>
</indexed-entities>
<!-- Use our custom IndexManager; TODO autoinject by default? -->
<property name="hibernate.search.default.indexmanager">org.infinispan.query.indexmanager.InfinispanIndexManager</property>
<property name="hibernate.search.indexing_strategy">manual</property>
<!-- Use latest Lucene version -->
<property name="lucene_version">LUCENE_CURRENT</property>
</indexing>
{code}
was:
We need a way to list annotation-less indexed entities in the infinispan XML.
The `<indexed-entities>` element schema will need to be extended as follows:
`<indexing index="ALL">
<indexed-entities>
<!-- annotated entity -->
<indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
<!-- non-annotated entity -->
<indexed-entity-mapping>
<!-- the FQN of the class to index -->
<class>my.domain.model.Author</class>
<!-- optional -->
<spatial name="place" mode="HASH"/>
<!-- list of indexed properties -->
<property name="name" type="method">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
</property>
<property name="title" type="method">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
</property>
<property type="method" name="birthdate">
<field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
<date-bridge resolution="DAY"/>
</property>
<property type="method" name="city">
<spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
</property>
</indexed-entity-mapping>
</indexed-entities>
<!-- Use our custom IndexManager; TODO autoinject by default? -->
<property name="hibernate.search.default.indexmanager">org.infinispan.query.indexmanager.InfinispanIndexManager</property>
<property name="hibernate.search.indexing_strategy">manual</property>
<!-- Use latest Lucene version -->
<property name="lucene_version">LUCENE_CURRENT</property>
</indexing>`
> Declarative indexed entity mapping
> ----------------------------------
>
> Key: ISPN-7842
> URL: https://issues.jboss.org/browse/ISPN-7842
> Project: Infinispan
> Issue Type: Enhancement
> Components: Configuration, Embedded Querying
> Reporter: Tristan Tarrant
> Assignee: Jakub Senko
> Priority: Minor
>
> We need a way to list annotation-less indexed entities in the infinispan XML.
> The
> {noformat}
> <indexed-entities>
> {noformat}
> element schema will need to be extended as follows:
> {code:xml}
> <indexing index="ALL">
> <indexed-entities>
> <!-- annotated entity -->
> <indexed-entity>org.infinispan.query.queries.faceting.Car</indexed-entity>
> <!-- non-annotated entity -->
> <indexed-entity-mapping>
> <!-- the FQN of the class to index -->
> <class>my.domain.model.Author</class>
> <!-- optional -->
> <spatial name="place" mode="HASH"/>
> <!-- list of indexed properties -->
> <property name="name" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> </property>
> <property name="title" type="method">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5" analyzer="titleanalyzer"/>
> </property>
> <property type="method" name="birthdate">
> <field store="true" index="true" analyze="true" norms="true" term-vector="yes" boost="0.5"/>
> <date-bridge resolution="DAY"/>
> </property>
>
> <property type="method" name="city">
> <spatial name="name" store="true" boost="0.5" spatial-mode="RANGE" />
> </property>
> </indexed-entity-mapping>
> </indexed-entities>
> <!-- Use our custom IndexManager; TODO autoinject by default? -->
> <property name="hibernate.search.default.indexmanager">org.infinispan.query.indexmanager.InfinispanIndexManager</property>
> <property name="hibernate.search.indexing_strategy">manual</property>
> <!-- Use latest Lucene version -->
> <property name="lucene_version">LUCENE_CURRENT</property>
> </indexing>
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months