An index is a data structure used to locate and access data from AEM quickly. It generally uses JCR queries to search and retrieve the contents. Indexing is used to increase the performance of the query and reduce the overhead on AEM i.e it improves the speed of data retrieval operations. In cases where the frequency of the queries that are executed is less and the content to be searched is less, then we could ignore indexing.
Oak supports the indexing of content that is stored in the repository. Oak supports Lucene-based indexes to support both property and full-text constraints. If multiple indexes are available for a query, each available indexer estimates the cost of executing the query. Oak then chooses the indexer with the lowest estimated cost.
Synchronous Indexing: Here, the index content gets updated as part of the commit itself. The changes made to both the main content and index content are done in a single commit. Here, the index will reflect always the latest content.