Apache Lucene open-source search software
SOLR-12160: Ref Guide: break up some longer paragraphs a bit
Cassandra Targettc6c1aeb768a5
diff --git a/solr/solr-ref-guide/src/time-routed-aliases.adoc b/solr/solr-ref-guide/src/time-routed-aliases.adocindex a16d1cff143..2e4160ee20c 100644--- a/solr/solr-ref-guide/src/time-routed-aliases.adoc+++ b/solr/solr-ref-guide/src/time-routed-aliases.adoc@@ -1,18 +1,21 @@= Time Routed AliasesTime Routed Aliases (TRAs) is a SolrCloud feature that manages an alias and a time sequential series of collections.+It automatically creates new collections and (optionally) deletes old ones as it routes documents to the correctcollection based on its timestamp.This approach allows for indefinite indexing of data without degradation of performance otherwise experienced due to thecontinuous growth of a single index.+If you need to store a lot of timestamped data in Solr, such as logs or IoT sensor data, then this feature probablymakes more sense than creating one sharded hash-routed collection.-== How it works+== How It WorksFirst you create a time routed aliases using the <<collections-api.adoc#createalias,CREATEALIAS>> command with somerouter settings.Most of the settings are editable at a later time using the <<collections-api.adoc#aliasprop,ALIASPROP>> command.+The first collection will be created automatically, along with an alias pointing to it.Each underlying Solr "core" in a collection that is a member of a TRA has a special core property referencing the alias.The name of each collection is comprised of the TRA name and the start timestamp (UTC), with trailing zeros and symbols@@ -22,17 +25,19 @@ Ideally, as a user of this feature, you needn't concern yourself with the particWhen adding data, you should usually direct documents to the alias (e.g., reference the alias name instead of any collection).The Solr server and CloudSolrClient will direct an update request to the first collection that an alias points to.+The collections list for a TRA is always reverse sorted, and thus the connection path of the request will route to the- lead collection. Using CloudSolrClient is preferable as it can reduce the number of underlying physical HTTP requests by one.+ lead collection. Using CloudSolrClient is preferable as it can reduce the number of underlying physical HTTP requests by one.If you know that a particular set of documents to be delivered is going to a particular older collection then you could- direct it there at the client side as an optimization but it's not necessary. CloudSolrClient does not (yet) do this.+ direct it there from the client side as an optimization but it's not necessary. CloudSolrClient does not (yet) do this.When processing an update for a TRA, Solr initializes its<<update-request-processors.adoc#update-request-processors,UpdateRequestProcessor>> chain as usual, but- when DistributedUpdateProcessor (DUP) initializes, it detects that the update targets a TRA and injects- TimeRoutedUpdateProcessor (TRUP) in front of itself.+ when `DistributedUpdateProcessor` (DUP) initializes, it detects that the update targets a TRA and injects+ `TimeRoutedUpdateProcessor` (TRUP) in front of itself.TRUP, in coordination with the Overseer, is the main part of a TRA, and must immediately precede DUP. It is notpossible to configure custom chains with other types of UpdateRequestProcessors between TRUP and DUP.+TRUP first reads TRA configuration from the alias properties when it is initialized. As it sees each document, it checks forchanges to TRA properties, updates its cached configuration if needed and then determines which collection thedocument belongs to:@@ -51,9 +56,10 @@ TRUP first reads TRA configuration from the alias properties when it is initialiadded at the front of the TRA.TRUP will create this collection, add it to the alias and then forward the document to the collection it just created.This can happen recursively if more than one collection needs to be created.- Each time a new collection is added, the oldest collections in the TRA are examined for possible deletion, if that has+++Each time a new collection is added, the oldest collections in the TRA are examined for possible deletion, if that hasbeen configured.- All this happens synchronously, potentially adding seconds to the update request and indexing latency.+All this happens synchronously, potentially adding seconds to the update request and indexing latency.Any other type of update like a commit or delete is routed by TRUP to all collections.Generally speaking, this is not a performance concern. When Solr receives a delete or commit wherein nothing is deleted@@ -82,8 +88,9 @@ Some _potential_ areas for improvement that _are not implemented yet_ are:* Only *time* routed aliases are supported. If you instead have some other sequential number, you could fake itas a time (e.g., convert to a timestamp assuming some epoch and increment).- The smallest possible interval is one second.- No other routing scheme is supported, although this feature was developed with considerations that it could be+++The smallest possible interval is one second.+No other routing scheme is supported, although this feature was developed with considerations that it could beextended/improved to other schemes.* The underlying collections form a contiguous sequence without gaps. This will not be suitable when there are