Class NormalizeLevel

java.lang.Object
com.yahoo.schema.document.NormalizeLevel

public class NormalizeLevel extends Object
class representing the character normalization we want to do on query and indexed text. Levels are strict subsets, so doing accent removal means doing codepoint normalizing and case normalizing also.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    The current levels are as follows: NONE: no changes to input text CODEPOINT: convert text into Unicode Normalization Form Compatibility Composition LOWERCASE: also convert text into lowercase letters ACCENT: do both above and remove accents on characters
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct a default (full) normalizelevel,
    NormalizeLevel(NormalizeLevel.Level level, boolean fromUser)
    Construct for a specific level, possibly user specified
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether accents should be removed from text
     
    void
    Change the current level to CODEPOINT as inferred by other features' needs.
    void
    Change the current level to LOWERCASE as inferred by other features' needs.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NormalizeLevel

      public NormalizeLevel()
      Construct a default (full) normalizelevel,
    • NormalizeLevel

      public NormalizeLevel(NormalizeLevel.Level level, boolean fromUser)
      Construct for a specific level, possibly user specified
      Parameters:
      level - which level to use
      fromUser - whether this was specified by the user
  • Method Details

    • doRemoveAccents

      public boolean doRemoveAccents()
      Returns whether accents should be removed from text
    • inferCodepoint

      public void inferCodepoint()
      Change the current level to CODEPOINT as inferred by other features' needs. If the current level was user specified it will not change; also this will not increase the level.
    • inferLowercase

      public void inferLowercase()
      Change the current level to LOWERCASE as inferred by other features' needs. If the current level was user specified it will not change; also this will not increase the level.
    • getLevel

      public NormalizeLevel.Level getLevel()