[infinispan-issues] [JBoss JIRA] (ISPN-7842) Declarative indexed entity mapping
Tristan Tarrant (JIRA)
issues at jboss.org
Mon May 15 15:46:00 EDT 2017
[ https://issues.jboss.org/browse/ISPN-7842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
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)
More information about the infinispan-issues
mailing list