Ce contenu n'est pas disponible dans la langue sélectionnée.

2.5. Tuning the Index


2.5.1. Near-Realtime Index Manager

By default, each update is immediately flushed into the index. In order to achieve better throughput, the updates can be batched. However, this can result in a lag between the update and query -- the query can see outdated data. If this is acceptable, you can use the Near-Realtime Index Manager by setting the following.
<property name="default.indexmanager" value="near-real-time" />
Copy to Clipboard Toggle word wrap

2.5.2. Tuning Infinispan Directory

Lucene directory uses three caches to store the index:
  • Data cache
  • Metadata cache
  • Locking cache
Configuration for these caches can be set explicitly, specifying the cache names as in the example below, and configuring those caches as usual. All of these caches must be clustered unless Infinispan Directory is used in local mode.

Example 2.7. Tuning the Infinispan Directory

<namedCache name="indexedCache">
    <clustering mode="DIST"/>
    <indexing enabled="true">
         <properties>
            <property 
                name="default.indexmanager" 
                value="org.infinispan.query.indexmanager.InfinispanIndexManager"
            />
            <property name="default.metadata_cachename" value="lucene_metadata_repl"/>
            <property name="default.data_cachename" value="lucene_data_dist"/>
            <property name="default.locking_cachename" value="lucene_locking_repl"/>
         </properties>
      </indexing>
   </namedCache>
   <namedCache name="lucene_metadata_repl">
      <clustering mode="REPL"/>
   </namedCache>
   <namedCache name="lucene_data_dist">
      <clustering mode="DIST"/>
   </namedCache>
   <namedCache name="lucene_locking_repl">
      <clustering mode="REPL"/>
</namedCache>
Copy to Clipboard Toggle word wrap

2.5.3. Per-Index Configuration

The indexing properties in examples above apply for all indices - this is because we use the default. prefix for each property. To specify different configuration for each index, replace default with the index name. By default, this is the full class name of the indexed object, however you can override the index name in the @Indexed annotation.
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat