Skip to content

Commit

Permalink
Correct some of the jdk17-offending javadocs (Lucene #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
dweiss authored and uschindler committed Apr 7, 2021
1 parent a0fb55c commit dc37a3d
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
* the list is non-empty, then a word must end with one of these conditions or it will
* bypass the step completely as an optimization.
* </ul>
* <p>
* @see <a href="http://www.inf.ufrgs.br/~viviane/rslp/index.htm">RSLP description</a>
* @lucene.internal
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,15 @@
* <tr><td>
* <table cellpadding="2" cellspacing="2" border="0" style="margin-left:auto; margin-right:auto" summary="cosine similarity formula">
* <tr>
* <td valign="middle" align="right" rowspan="1">
* <td style="vertical-align: middle; text-align: right" rowspan="1">
* cosine-similarity(q,d) &nbsp; = &nbsp;
* </td>
* <td valign="middle" align="center">
* <table summary="cosine similarity formula">
* <tr><td align="center" style="text-align: center"><small>V(q)&nbsp;&middot;&nbsp;V(d)</small></td></tr>
* <tr><td align="center" style="text-align: center">&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;</td></tr>
* <tr><td align="center" style="text-align: center"><small>|V(q)|&nbsp;|V(d)|</small></td></tr>
* <td style="vertical-align: middle; text-align: center">
* <table>
* <caption>cosine similarity formula</caption>
* <tr><td style="text-align: center"><small>V(q)&nbsp;&middot;&nbsp;V(d)</small></td></tr>
* <tr><td style="text-align: center">&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;</td></tr>
* <tr><td style="text-align: center"><small>|V(q)|&nbsp;|V(d)|</small></td></tr>
* </table>
* </td>
* </tr>
Expand Down Expand Up @@ -167,18 +168,19 @@
* <tr><td>
* <table cellpadding="2" cellspacing="2" border="0" style="margin-left:auto; margin-right:auto" summary="formatting only">
* <tr>
* <td valign="middle" align="right" rowspan="1">
* <td style="vertical-align: middle; text-align: right" rowspan="1">
* score(q,d) &nbsp; = &nbsp;
* <span style="color: #CCCC00">query-boost(q)</span> &middot; &nbsp;
* </td>
* <td valign="middle" align="center">
* <table summary="Lucene conceptual scoring formula">
* <tr><td align="center" style="text-align: center"><small><span style="color: #993399">V(q)&nbsp;&middot;&nbsp;V(d)</span></small></td></tr>
* <tr><td align="center" style="text-align: center">&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;</td></tr>
* <tr><td align="center" style="text-align: center"><small><span style="color: #FF33CC">|V(q)|</span></small></td></tr>
* <td style="vertical-align: middle; text-align: center">
* <table>
* <caption>Lucene conceptual scoring formula</caption>
* <tr><td style="text-align: center"><small><span style="color: #993399">V(q)&nbsp;&middot;&nbsp;V(d)</span></small></td></tr>
* <tr><td style="text-align: center">&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;</td></tr>
* <tr><td style="text-align: center"><small><span style="color: #FF33CC">|V(q)|</span></small></td></tr>
* </table>
* </td>
* <td valign="middle" align="right" rowspan="1">
* <td style="vertical-align: middle; text-align: right" rowspan="1">
* &nbsp; &middot; &nbsp; <span style="color: #3399FF">doc-len-norm(d)</span>
* &nbsp; &middot; &nbsp; <span style="color: #3399FF">doc-boost(d)</span>
* </td>
Expand Down Expand Up @@ -252,20 +254,20 @@
* <tr><td>
* <table cellpadding="2" cellspacing="2" border="0" style="margin-left:auto; margin-right:auto" summary="Lucene conceptual scoring formula">
* <tr>
* <td valign="middle" align="right" rowspan="1">
* <td style="vertical-align: middle; text-align: right" rowspan="1">
* score(q,d) &nbsp; = &nbsp;
* <big><big><big>&sum;</big></big></big>
* </td>
* <td valign="middle" align="right" rowspan="1">
* <big><big>(</big></big>
* <td style="vertical-align: middle; text-align: right" rowspan="1">
* <span style="font-size: larger">(</span>
* <A HREF="#formula_tf"><span style="color: #993399">tf(t in d)</span></A> &nbsp;&middot;&nbsp;
* <A HREF="#formula_idf"><span style="color: #993399">idf(t)</span></A><sup>2</sup> &nbsp;&middot;&nbsp;
* <A HREF="#formula_termBoost"><span style="color: #CCCC00">t.getBoost()</span></A>&nbsp;&middot;&nbsp;
* <A HREF="#formula_norm"><span style="color: #3399FF">norm(t,d)</span></A>
* <big><big>)</big></big>
* </td>
* </tr>
* <tr valign="top">
* <tr style="vertical-align: top">
* <td></td>
* <td align="center" style="text-align: center"><small>t in q</small></td>
* <td></td>
Expand Down Expand Up @@ -297,11 +299,11 @@
* <br>&nbsp;<br>
* <table cellpadding="2" cellspacing="2" border="0" style="width:auto; margin-left:auto; margin-right:auto" summary="term frequency computation">
* <tr>
* <td valign="middle" align="right" rowspan="1">
* <td style="vertical-align: middle; text-align: right" rowspan="1">
* {@link org.apache.lucene.search.similarities.ClassicSimilarity#tf(float) tf(t in d)} &nbsp; = &nbsp;
* </td>
* <td valign="top" align="center" rowspan="1">
* frequency<sup><big>&frac12;</big></sup>
* <td style="vertical-align: top; text-align: center" rowspan="1">
* frequency<sup><span style="font-size: larger">&frac12;</span></sup>
* </td>
* </tr>
* </table>
Expand All @@ -322,21 +324,22 @@
* <br>&nbsp;<br>
* <table cellpadding="2" cellspacing="2" border="0" style="width:auto; margin-left:auto; margin-right:auto" summary="inverse document frequency computation">
* <tr>
* <td valign="middle" align="right">
* <td style="vertical-align: middle; text-align: right">
* {@link org.apache.lucene.search.similarities.ClassicSimilarity#idf(long, long) idf(t)}&nbsp; = &nbsp;
* </td>
* <td valign="middle" align="center">
* 1 + log <big>(</big>
* <td style="vertical-align: middle; text-align: center">
* 1 + log <span style="font-size: larger">(</span>
* </td>
* <td valign="middle" align="center">
* <table summary="inverse document frequency computation">
* <tr><td align="center" style="text-align: center"><small>docCount+1</small></td></tr>
* <tr><td align="center" style="text-align: center">&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;</td></tr>
* <tr><td align="center" style="text-align: center"><small>docFreq+1</small></td></tr>
* <td style="vertical-align: middle; text-align: center">
* <table>
* <caption>inverse document frequency computation</caption>
* <tr><td style="text-align: center"><small>docCount+1</small></td></tr>
* <tr><td style="text-align: center">&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;</td></tr>
* <tr><td style="text-align: center"><small>docFreq+1</small></td></tr>
* </table>
* </td>
* <td valign="middle" align="center">
* <big>)</big>
* <td style="vertical-align: middle; text-align: center">
* <span style="font-size: larger">)</span>
* </td>
* </tr>
* </table>
Expand Down
40 changes: 20 additions & 20 deletions lucene/core/src/java/org/apache/lucene/store/DataOutput.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,89 +91,89 @@ public void writeShort(short i) throws IOException {
* byte, values from 128 to 16,383 may be stored in two bytes, and so on.</p>
* <p>VByte Encoding Example</p>
* <table cellspacing="0" cellpadding="2" border="0" summary="variable length encoding examples">
* <tr valign="top">
* <tr style="vertical-align: top">
* <th align="left">Value</th>
* <th align="left">Byte 1</th>
* <th align="left">Byte 2</th>
* <th align="left">Byte 3</th>
* </tr>
* <tr valign="bottom">
* <tr style="vertical-align: bottom">
* <td>0</td>
* <td><code>00000000</code></td>
* <td></td>
* <td></td>
* </tr>
* <tr valign="bottom">
* <tr style="vertical-align: bottom">
* <td>1</td>
* <td><code>00000001</code></td>
* <td></td>
* <td></td>
* </tr>
* <tr valign="bottom">
* <tr style="vertical-align: bottom">
* <td>2</td>
* <td><code>00000010</code></td>
* <td></td>
* <td></td>
* </tr>
* <tr>
* <td valign="top">...</td>
* <td valign="bottom"></td>
* <td valign="bottom"></td>
* <td valign="bottom"></td>
* <td style="vertical-align: top">...</td>
* <td></td>
* <td></td>
* <td></td>
* </tr>
* <tr valign="bottom">
* <tr style="vertical-align: bottom">
* <td>127</td>
* <td><code>01111111</code></td>
* <td></td>
* <td></td>
* </tr>
* <tr valign="bottom">
* <tr style="vertical-align: bottom">
* <td>128</td>
* <td><code>10000000</code></td>
* <td><code>00000001</code></td>
* <td></td>
* </tr>
* <tr valign="bottom">
* <tr style="vertical-align: bottom">
* <td>129</td>
* <td><code>10000001</code></td>
* <td><code>00000001</code></td>
* <td></td>
* </tr>
* <tr valign="bottom">
* <tr style="vertical-align: bottom">
* <td>130</td>
* <td><code>10000010</code></td>
* <td><code>00000001</code></td>
* <td></td>
* </tr>
* <tr>
* <td valign="top">...</td>
* <td style="vertical-align: top">...</td>
* <td></td>
* <td></td>
* <td></td>
* </tr>
* <tr valign="bottom">
* <tr style="vertical-align: bottom">
* <td>16,383</td>
* <td><code>11111111</code></td>
* <td><code>01111111</code></td>
* <td></td>
* </tr>
* <tr valign="bottom">
* <tr style="vertical-align: bottom">
* <td>16,384</td>
* <td><code>10000000</code></td>
* <td><code>10000000</code></td>
* <td><code>00000001</code></td>
* </tr>
* <tr valign="bottom">
* <tr style="vertical-align: bottom">
* <td>16,385</td>
* <td><code>10000001</code></td>
* <td><code>10000000</code></td>
* <td><code>00000001</code></td>
* </tr>
* <tr>
* <td valign="top">...</td>
* <td valign="bottom"></td>
* <td valign="bottom"></td>
* <td valign="bottom"></td>
* <td style="vertical-align: top">...</td>
* <td ></td>
* <td ></td>
* <td ></td>
* </tr>
* </table>
* <p>This provides compression while still being efficient to decode.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,8 @@ public CacheHelper getReaderCacheHelper() {
/**
* Creates a Map of <code>WeightedSpanTerms</code> from the given <code>Query</code> and <code>TokenStream</code>.
*
* <p>
*
* @param query
* that caused hit
* @param tokenStream
* of text to be highlighted
* @param query that caused hit
* @param tokenStream of text to be highlighted
* @return Map containing WeightedSpanTerms
* @throws IOException If there is a low-level I/O error
*/
Expand All @@ -509,14 +505,9 @@ public Map<String,WeightedSpanTerm> getWeightedSpanTerms(Query query, float boos
/**
* Creates a Map of <code>WeightedSpanTerms</code> from the given <code>Query</code> and <code>TokenStream</code>.
*
* <p>
*
* @param query
* that caused hit
* @param tokenStream
* of text to be highlighted
* @param fieldName
* restricts Term's used based on field name
* @param query that caused hit
* @param tokenStream of text to be highlighted
* @param fieldName restricts Term's used based on field name
* @return Map containing WeightedSpanTerms
* @throws IOException If there is a low-level I/O error
*/
Expand All @@ -539,16 +530,10 @@ public Map<String,WeightedSpanTerm> getWeightedSpanTerms(Query query, float boos
* Creates a Map of <code>WeightedSpanTerms</code> from the given <code>Query</code> and <code>TokenStream</code>. Uses a supplied
* <code>IndexReader</code> to properly weight terms (for gradient highlighting).
*
* <p>
*
* @param query
* that caused hit
* @param tokenStream
* of text to be highlighted
* @param fieldName
* restricts Term's used based on field name
* @param reader
* to use for scoring
* @param query that caused hit
* @param tokenStream of text to be highlighted
* @param fieldName restricts Term's used based on field name
* @param reader to use for scoring
* @return Map of WeightedSpanTerms with quasi tf/idf scores
* @throws IOException If there is a low-level I/O error
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ public static Query createJoinQuery(String fromField,
* Method for query time joining for numeric fields. It supports multi- and single- values longs, ints, floats and longs.
* All considerations from {@link JoinUtil#createJoinQuery(String, boolean, String, Query, IndexSearcher, ScoreMode)} are applicable here too,
* though memory consumption might be higher.
* <p>
*
* @param fromField The from field to join from
* @param multipleValuesPerDocument Whether the from field has multiple terms per document
* when true fromField might be {@link DocValuesType#SORTED_NUMERIC},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ public static Query newLargePolygonQuery(final String field, PlanetModel planetM

/**
* Create a query for matching a path.
* <p>
* @param field field name. must not be null.
* @param pathLatitudes latitude values for points of the path: must be within standard +/-90 coordinate bounds.
* @param pathLongitudes longitude values for points of the path: must be within standard +/-180 coordinate bounds.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

/**
* Similarity measure for short strings such as person names.
* <p>
* @see <a href="http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance">http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance</a>
* @see <a
* href="http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance">http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance</a>
*/
public class JaroWinklerDistance implements StringDistance {

Expand Down

0 comments on commit dc37a3d

Please sign in to comment.