Apache Lucene open-source search software
LUCENE-910: added or changed warning comments for APIs related to Payloads
Michael Busch35b5ace0ab65
diff --git a/src/java/org/apache/lucene/analysis/Token.java b/src/java/org/apache/lucene/analysis/Token.javaindex 38d23495d11..acb7a8bf792 100644--- a/src/java/org/apache/lucene/analysis/Token.java+++ b/src/java/org/apache/lucene/analysis/Token.java@@ -39,12 +39,10 @@ import org.apache.lucene.index.TermPositions;{@link TermPositions#getPayload(byte[], int)} to retrieve the payloads from the index.<br><br>- <b>- Warning: The status of the Payloads feature is experimental. The APIs- introduced here might change in the future and will not be supported anymore- in such a case. If you want to use this feature in a production environment- you should wait for an official release.- </b>+ <p><font color="#FF0000">+ WARNING: The status of the <b>Payloads</b> feature is experimental.+ The APIs introduced here might change in the future and will not be+ supported anymore in such a case.</font>@see org.apache.lucene.index.Payload*/@@ -137,13 +135,10 @@ public class Token implements Cloneable {/*** Sets this Token's payload.- * <p>- * <b>- * Warning: The status of the Payloads feature is experimental. The APIs- * introduced here might change in the future and will not be supported anymore- * in such a case. If you want to use this feature in a production environment- * you should wait for an official release.- * </b>+ * <p><font color="#FF0000">+ * WARNING: The status of the <b>Payloads</b> feature is experimental.+ * The APIs introduced here might change in the future and will not be+ * supported anymore in such a case.</font>*/// TODO: Remove warning after API has been finalizedpublic void setPayload(Payload payload) {@@ -152,13 +147,10 @@ public class Token implements Cloneable {/*** Returns this Token's payload.- * <p>- * <b>- * Warning: The status of the Payloads feature is experimental. The APIs- * introduced here might change in the future and will not be supported anymore- * in such a case. If you want to use this feature in a production environment- * you should wait for an official release.- * </b>+ * <p><font color="#FF0000">+ * WARNING: The status of the <b>Payloads</b> feature is experimental.+ * The APIs introduced here might change in the future and will not be+ * supported anymore in such a case.</font>*/// TODO: Remove warning after API has been finalizedpublic Payload getPayload() {diff --git a/src/java/org/apache/lucene/index/Payload.java b/src/java/org/apache/lucene/index/Payload.javaindex 2d0c49cfbf5..716a4c24f4b 100644--- a/src/java/org/apache/lucene/index/Payload.java+++ b/src/java/org/apache/lucene/index/Payload.java@@ -34,12 +34,10 @@ import org.apache.lucene.analysis.TokenStream;* to retrieve the payloads from the index.<br>* <br>*- * <b>- * Warning: The status of the Payloads feature is experimental. The APIs- * introduced here might change in the future and will not be supported anymore- * in such a case. If you want to use this feature in a production environment- * you should wait for an official release.- * </b>+ * <p><font color="#FF0000">+ * WARNING: The status of the <b>Payloads</b> feature is experimental.+ * The APIs introduced here might change in the future and will not be+ * supported anymore in such a case.</font>*/// TODO: Remove warning after API has been finalizedpublic class Payload implements Serializable {diff --git a/src/java/org/apache/lucene/index/TermPositions.java b/src/java/org/apache/lucene/index/TermPositions.javaindex d4864c9ce0a..5c5cec59a0e 100644--- a/src/java/org/apache/lucene/index/TermPositions.java+++ b/src/java/org/apache/lucene/index/TermPositions.java@@ -44,12 +44,10 @@ public interface TermPositions* This is invalid until {@link #nextPosition()} is called for* the first time.<br>* <br>- * <b>- * Warning: The status of the Payloads feature is experimental. The APIs- * introduced here might change in the future and will not be supported anymore- * in such a case. If you want to use this feature in a production environment- * you should wait for an official release.- * </b>+ * <p><font color="#FF0000">+ * WARNING: The status of the <b>Payloads</b> feature is experimental.+ * The APIs introduced here might change in the future and will not be+ * supported anymore in such a case.</font>* @return length of the current payload in number of bytes*/// TODO: Remove warning after API has been finalized@@ -64,12 +62,10 @@ public interface TermPositions* so if the payload data for the current position is not needed,* this method may not be called at all for performance reasons.<br>* <br>- * <b>- * Warning: The status of the Payloads feature is experimental. The APIs- * introduced here might change in the future and will not be supported anymore- * in such a case. If you want to use this feature in a production environment- * you should wait for an official release.- * </b>+ * <p><font color="#FF0000">+ * WARNING: The status of the <b>Payloads</b> feature is experimental.+ * The APIs introduced here might change in the future and will not be+ * supported anymore in such a case.</font>** @param data the array into which the data of this payload is to be* stored, if it is big enough; otherwise, a new byte[] array@@ -88,14 +84,12 @@ public interface TermPositions* Payloads can only be loaded once per call to* {@link #nextPosition()}.*+ * <p><font color="#FF0000">+ * WARNING: The status of the <b>Payloads</b> feature is experimental.+ * The APIs introduced here might change in the future and will not be+ * supported anymore in such a case.</font>+ ** @return true if there is a payload available at this position that can be loaded- *- * * <b>- * Warning: The status of the Payloads feature is experimental. The APIs- * introduced here might change in the future and will not be supported anymore- * in such a case. If you want to use this feature in a production environment- * you should wait for an official release.- * </b>*/// TODO: Remove warning after API has been finalizedpublic boolean isPayloadAvailable();diff --git a/src/java/org/apache/lucene/search/payloads/BoostingTermQuery.java b/src/java/org/apache/lucene/search/payloads/BoostingTermQuery.javaindex 390beed5d15..488e5ac4982 100644--- a/src/java/org/apache/lucene/search/payloads/BoostingTermQuery.java+++ b/src/java/org/apache/lucene/search/payloads/BoostingTermQuery.java@@ -37,6 +37,10 @@ import java.io.IOException;* <p>* Payload scores are averaged across term occurrences in the document.*+ * <p><font color="#FF0000">+ * WARNING: The status of the <b>Payloads</b> feature is experimental.+ * The APIs introduced here might change in the future and will not be+ * supported anymore in such a case.</font>** @see org.apache.lucene.search.Similarity#scorePayload(byte[], int, int)*/diff --git a/src/java/org/apache/lucene/search/payloads/package.html b/src/java/org/apache/lucene/search/payloads/package.htmlindex 6ccf978f3a9..37100f1e786 100644--- a/src/java/org/apache/lucene/search/payloads/package.html+++ b/src/java/org/apache/lucene/search/payloads/package.html@@ -29,8 +29,15 @@<li><a href="./BoostingTermQuery.html">BoostingTermQuery</a> -- Boost a term's score based on the value of the payload located at that term</li></ol></div>+<DIV>+<font color="#FF0000">+WARNING: The status of the <b>Payloads</b> feature is experimental. The APIs+introduced here might change in the future and will not be supported anymore+in such a case.+</font>+</DIV><DIV> </DIV><DIV align="center"></DIV></BODY>-</HTML>\ No newline at end of file+</HTML>