Merge branch 'stable-2.8'

* stable-2.8:
  Add link to validation listeners in the plugin documentation
  Add missing documentation of secondary index configuration

Conflicts:
	Documentation/config-gerrit.txt

Change-Id: I7f6649621e7e716cecce0205dbb3c6995a73561b
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index 26a0ecb..8dbd679 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -1884,6 +1884,47 @@
 using the link:pgm-reindex.html[reindex program] before restarting the
 Gerrit server.
 
+Open and closed changes are indexed in separate indexes named
+'changes_open' and 'changes_closed' respectively.
+
+[[index.name.ramBufferSize]]index.name.ramBufferSize::
++
+Only used when the type is `LUCENE`.
++
+Determines the amount of RAM that may be used for buffering added documents
+and deletions before they are flushed to the index.  See the
+link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setRAMBufferSizeMB(double)[
+Lucene documentation] for further details.
++
+Defaults to 16M.
+
+[[index.name.maxBufferedDocs]]index.name.maxBufferedDocs::
++
+Only used when the type is `LUCENE`.
++
+Determines the minimal number of documents required before the buffered
+in-memory documents are flushed to the index. Large values generally
+give faster indexing.  See the
+link:http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/LiveIndexWriterConfig.html#setMaxBufferedDocs(int)[
+Lucene documentation] for further details.
++
+Defaults to -1, meaning no maximum is set and the writer will flush
+according to RAM usage.
+
+Sample index configuration:
+----
+[index]
+  type = LUCENE
+
+[index "changes_open"]
+  ramBufferSize = 60 m
+  maxBufferedDocs = 3000
+
+[index "changes_closed"]
+  ramBufferSize = 20 m
+  maxBufferedDocs = 500
+----
+
 [[ldap]]
 === Section ldap
 
diff --git a/Documentation/dev-plugins.txt b/Documentation/dev-plugins.txt
index 8b101c6..97f7f1e 100644
--- a/Documentation/dev-plugins.txt
+++ b/Documentation/dev-plugins.txt
@@ -410,6 +410,12 @@
 methods in the `ChangeHookRunner` class, passing an instance of
 its own custom event class derived from `ChangeEvent`.
 
+[[validation]]
+== Validation Listeners
+
+Certain operations in Gerrit can be validated by plugins by
+implementing the corresponding link:config-validation.html[listeners].
+
 [[ssh]]
 == SSH Commands