Este contenido no está disponible en el idioma seleccionado.

11.2. Indexing Modes


11.2.1. Managing Indexes

In Red Hat JBoss Data Grid's Query Module there are two options for storing indexes:
  1. Each node can maintain an individual copy of the global index.
  2. The index can be shared across all nodes.
When the indexes are stored locally, by setting indexLocalOnly to true, each write to cache must be forwarded to all other nodes so that they can update their indexes. If the index is shared, by setting indexLocalOnly to false, only the node where the write originates is required to update the shared index.
Lucene provides an abstraction of the directory structure called directory provider, which is used to store the index. The index can be stored, for example, as in-memory, on filesystem, or in distributed cache.

11.2.2. Managing the Index in Local Mode

In local mode, any Lucene Directory implementation may be used. The indexLocalOnly option is meaningless in local mode.

11.2.3. Managing the Index in Replicated Mode

In replication mode, each node can store its own local copy of the index. To store indexes locally on each node, set indexLocalOnly to false, so that each node will apply the required updates it receives from other nodes in addition to the updates started locally.
Any Directory implementation can be used. When a new node is started it must receive an up to date copy of the index. Usually this can be done via resync, however being an external operation, this may result in a slightly out of sync index, particularly where updates are frequent.
Alternatively, if a shared storage for indexes is used (see Section 11.3.3, “Infinispan Directory Provider”), indexLocalOnly must be set to true so that each node will only apply the changes originated locally. While there is no risk of having an out of sync index, this causes contention on the node used for updating the index.
The following diagram demonstrates a replicated deployment where each node has a local index.
Indexing in Replicated Mode

Figure 11.1. Replicated Cache Querying

11.2.4. Managing the Index in Distribution Mode

In both Distribution modes, the shared index must be used, with the indexLocalOnly set to true.
The following diagram shows a deployment with a shared index.
Querying with a shared index

Figure 11.2. Querying with a Shared Index

11.2.5. Managing the Index in Invalidation Mode

Indexing and searching of elements in Invalidation mode is not supported.
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.