Skip to content

Commit

Permalink
HSEARCH-2584 Fix style issues that I missed during the review
Browse files Browse the repository at this point in the history
Signed-off-by: Yoann Rodière <yoann@hibernate.org>
  • Loading branch information
yrodiere committed Oct 23, 2020
1 parent 3f53fb2 commit feb34fc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
Expand Up @@ -611,28 +611,28 @@ Then, lowercase each token.
`simple`::
Default implementation: `org.apache.lucene.analysis.core.SimpleAnalyzer`.
+
Default behavior: first, tokenize the text into tokens whenever it encounters a character which is not a letter.
Default behavior: first, split the text at non-letter characters.
Then, lowercase each token.
`whitespace`::
Default implementation: `org.apache.lucene.analysis.core.WhitespaceAnalyzer`.
+
Default behavior: tokenize the text into tokens whenever it encounters a character which is a white space.
Default behavior: split the text at whitespace characters.
Do not change the tokens.
`stop`::
Default implementation: `org.apache.lucene.analysis.core.StopAnalyzer`.
+
Default behavior: first, tokenize the text into tokens whenever it encounters a character which is not a letter.
Default behavior: first, split the text at non-letter characters.
Then, lowercase each token.
Finally, remove english stop words.
Finally, remove English stop words.
`keyword`::
Default implementation: `org.apache.lucene.analysis.core.KeywordAnalyzer`.
+
Default behavior: do not change in any way the text.
Default behavior: do not change the text in any way.
+
With this analyzer a full text field would behave similarly to a keyword field,
but with fewer features: no terms aggregations, for example.
+
Maybe you should consider using a <<mapper-orm-directfieldmapping-annotations-keywordfield,`@KeywordField`>> instead.
Consider using a <<mapper-orm-directfieldmapping-annotations-keywordfield,`@KeywordField`>> instead.

The Lucene backend does not provide any built-in normalizer.

Expand Down
Expand Up @@ -31,6 +31,8 @@ private AnalyzerNames() {

/**
* The standard analyzer.
* <p>
* Unless overridden by explicit analysis configuration, this analyzer behaves as follows:
* <ul>
* <li>First, tokenize using the standard tokenizer, which follows Word Break rules from the
* Unicode Text Segmentation algorithm, as specified in
Expand All @@ -42,26 +44,32 @@ private AnalyzerNames() {

/**
* The simple analyzer.
* <p>
* Unless overridden by explicit analysis configuration, this analyzer behaves as follows:
* <ul>
* <li>First, tokenize the text into tokens whenever it encounters a character which is not a letter.</li>
* <li>First, tokenize by assuming non-letter characters are separators.</li>
* <li>Then, lowercase each token.</li>
* </ul>
*/
public static final String SIMPLE = "simple";

/**
* The whitespace analyzer.
* <p>
* Unless overridden by explicit analysis configuration, this analyzer behaves as follows:
* <ul>
* <li>Tokenize the text into tokens whenever it encounters a character which is a white space.</li>
* <li>First, tokenize by assuming whitespace characters are separators.</li>
* <li>Do not change the tokens.</li>
* </ul>
*/
public static final String WHITESPACE = "whitespace";

/**
* The stop analyzer.
* <p>
* Unless overridden by explicit analysis configuration, this analyzer behaves as follows:
* <ul>
* <li>First, tokenize the text into tokens whenever it encounters a character which is not a letter.</li>
* <li>First, tokenize by assuming non-letter characters are separators.</li>
* <li>Then, lowercase each token.</li>
* <li>finally, remove english stop words.</li>
* </ul>
Expand All @@ -71,11 +79,12 @@ private AnalyzerNames() {
/**
* The keyword analyzer.
* <p>
* Do not change in any way the text.
* With this analyzer a full text field would behave similarly to a keyword field,
* Unless overridden by explicit analysis configuration, this analyzer does not change the text in any way.
* <p>
* With this analyzer, a full text field would behave similarly to a keyword field,
* but with fewer features: no terms aggregations, for example.
* <p>
* Maybe you should consider using a keyword field instead.
* Consider using a keyword field instead.
*/
public static final String KEYWORD = "keyword";

Expand Down

0 comments on commit feb34fc

Please sign in to comment.