Class StemmerOverrideService

java.lang.Object
org.codelibs.fess.app.service.StemmerOverrideService

public class StemmerOverrideService extends Object
Service class for managing stemmer override dictionary operations. This service provides functionality for CRUD operations on stemmer override dictionaries. Stemmer override dictionaries allow administrators to define custom stemming rules that override the default stemming behavior for specific terms, improving search accuracy for domain-specific vocabularies.
  • Field Details

    • dictionaryManager

      protected DictionaryManager dictionaryManager
      Dictionary manager for accessing dictionary files.
    • fessConfig

      protected org.codelibs.fess.mylasta.direction.FessConfig fessConfig
      Fess configuration for accessing system settings.
  • Constructor Details

    • StemmerOverrideService

      public StemmerOverrideService()
      Default constructor.
  • Method Details

    • getStemmerOverrideList

      public List<StemmerOverrideItem> getStemmerOverrideList(String dictId, StemmerOverridePager stemmerOvberridePager)
      Retrieves a paginated list of stemmer override items from the specified dictionary. This method fetches stemmer override entries with pagination support, updating the provided pager with the current page state and navigation information.
      Parameters:
      dictId - The ID of the stemmer override dictionary to query
      stemmerOvberridePager - The pager object for pagination control and state
      Returns:
      A list of stemmer override items for the current page, or empty list if dictionary not found
    • getStemmerOverrideFile

      public org.dbflute.optional.OptionalEntity<StemmerOverrideFile> getStemmerOverrideFile(String dictId)
      Retrieves the stemmer override dictionary file by ID.
      Parameters:
      dictId - The ID of the stemmer override dictionary to retrieve
      Returns:
      An OptionalEntity containing the stemmer override file if found, empty otherwise
    • getStemmerOverrideItem

      public org.dbflute.optional.OptionalEntity<StemmerOverrideItem> getStemmerOverrideItem(String dictId, long id)
      Retrieves a specific stemmer override item by dictionary ID and item ID.
      Parameters:
      dictId - The ID of the stemmer override dictionary
      id - The unique ID of the stemmer override item to retrieve
      Returns:
      An OptionalEntity containing the stemmer override item if found, empty otherwise
    • store

      public void store(String dictId, StemmerOverrideItem stemmerOvberrideItem)
      Stores (creates or updates) a stemmer override item in the specified dictionary. If the item ID is 0, this method performs an insert operation. Otherwise, it performs an update operation for the existing item.
      Parameters:
      dictId - The ID of the stemmer override dictionary
      stemmerOvberrideItem - The stemmer override item to store
    • delete

      public void delete(String dictId, StemmerOverrideItem stemmerOvberrideItem)
      Deletes a stemmer override item from the specified dictionary.
      Parameters:
      dictId - The ID of the stemmer override dictionary
      stemmerOvberrideItem - The stemmer override item to delete