Skip to content

Apache Lucene open-source search software

repair analysis javadocs around synonyms

Mike McCandlessec5ebb6886f5
diff --git a/lucene/core/src/java/org/apache/lucene/analysis/package-info.java b/lucene/core/src/java/org/apache/lucene/analysis/package-info.java
index 81858df198d..a536f73fc16 100644
--- a/lucene/core/src/java/org/apache/lucene/analysis/package-info.java
+++ b/lucene/core/src/java/org/apache/lucene/analysis/package-info.java
@@ -362,11 +362,13 @@
* </p>
* <ol>
* <li>Inhibiting phrase and proximity matches in sentence boundaries &ndash; for this, a tokenizer that
- * identifies a new sentence can add 1 to the position increment of the first token of the new sentence.</li>
- * <li>Injecting synonyms &ndash; here, synonyms of a token should be added after that token,
- * and their position increment should be set to 0.
- * As result, all synonyms of a token would be considered to appear in exactly the
- * same position as that token, and so would they be seen by phrase and proximity searches.</li>
+ * identifies a new sentence can add 1 to the position increment of the first token of the new sentence.</li>
+ * <li>Injecting synonyms &ndash; synonyms of a token should be created at the same position as the
+ * original token, and the output order of the original token and the injected synonym is undefined
+ * as long as they both leave from the same position. As result, all synonyms of a token would be
+ * considered to appear in exactly the same position as that token, and so would they be seen by
+ * phrase and proximity searches. For multi-token synonyms to work correctly, you should use
+ * {@code SynoymGraphFilter} at search time only.</li>
* </ol>
*
* <h3>Token Position Length</h3>