Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-2429

A Rotating Split Policy For Managing Bounded Indices

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.1
    • Fix Version/s: None
    • Component/s: core/index, modules/other
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      (Please note that the feature described in LUCENE-2425 is required reading for this issue.)

      A rotating split policy maintains a bounded set of sub-indices underneath the split index's directory. The motivation for such a policy is to be able to control the size of the index in a user-defined manner. It comes in handy in scenarios where (a) documents are added at a higher-than-normal rate, and (b) documents older than a certain cut-off date needn't be searchable. As a matter of fact, this policy is applicable to most real-time streams, given that they tend to satisfy both of the above properties.

      In short, when the number of sub-indices hits the maximum allowed number (@see

      {@link ROTATING_POLICY_MAXIMUM_SUB_INDICES}

      ), then this policy effectively forces the last sub-index out of the split index. A sub-index is deemed to be the last one if it is considered to be lesser (according to #getDirectoryComparator) than every other sub-index.

      The exact point in time at which rotation occurs is determined by the split rule(s) in effect for this policy. For example, one may apply a scheduled split rule (see LUCENE-2427) if one wishes the split to occur at fixed intervals. For finer control over the periodicity of the interval, a cron split rule (see LUCENE-2428) may be employed.

      To illustrate the behavior of the rotation policy policy, consider a split rule that triggers a split on the hour every hour. Furthermore, let's assume that the maximum number of sub-indices allowed is 7. In this case, the rotation policy will have no more than 8 hours worth of data (1 hour in the super-index and each of the 7 sub-indices).

        Attachments

        1. LUCENE-2429.patch
          17 kB
          Karthick Sankarachary

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                karthick Karthick Sankarachary
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: