Package org.codelibs.fess.app.service
Class ElevateWordService
java.lang.Object
org.codelibs.fess.app.service.ElevateWordService
Service class for managing elevate words functionality.
Elevate words are used to boost the relevance of documents containing specific terms in search results.
This service provides CRUD operations, CSV import/export, and related functionality.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.codelibs.fess.opensearch.config.exbhv.ElevateWordBhvBehavior handler for ElevateWord entity operationsprotected org.codelibs.fess.opensearch.config.exbhv.ElevateWordToLabelBhvBehavior handler for ElevateWordToLabel entity operationsprotected org.codelibs.fess.mylasta.direction.FessConfigConfiguration settings for Fess applicationprotected org.codelibs.fess.opensearch.config.exbhv.LabelTypeBhvBehavior handler for LabelType entity operationsprotected SearchEngineClientClient for interacting with the search engine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(org.codelibs.fess.opensearch.config.exentity.ElevateWord elevateWord) Deletes an elevate word from the system.voidExports elevate words to a CSV file.org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.ElevateWord> getElevateWord(String id) Retrieves a specific elevate word by its ID, including associated label type information.List<org.codelibs.fess.opensearch.config.exentity.ElevateWord> getElevateWordList(ElevateWordPager elevateWordPager) Retrieves a paginated list of elevate words based on the provided pager criteria.voidImports elevate words from a CSV file.protected voidsetupListCondition(org.codelibs.fess.opensearch.config.cbean.ElevateWordCB cb, ElevateWordPager elevateWordPager) Sets up the condition builder for querying elevate words based on pager criteria.voidstore(org.codelibs.fess.opensearch.config.exentity.ElevateWord elevateWord) Stores (inserts or updates) an elevate word and manages its associated label type mappings.
-
Field Details
-
elevateWordToLabelBhv
protected org.codelibs.fess.opensearch.config.exbhv.ElevateWordToLabelBhv elevateWordToLabelBhvBehavior handler for ElevateWordToLabel entity operations -
elevateWordBhv
protected org.codelibs.fess.opensearch.config.exbhv.ElevateWordBhv elevateWordBhvBehavior handler for ElevateWord entity operations -
labelTypeBhv
protected org.codelibs.fess.opensearch.config.exbhv.LabelTypeBhv labelTypeBhvBehavior handler for LabelType entity operations -
fessConfig
protected org.codelibs.fess.mylasta.direction.FessConfig fessConfigConfiguration settings for Fess application -
searchEngineClient
Client for interacting with the search engine
-
-
Constructor Details
-
ElevateWordService
public ElevateWordService()Default constructor.
-
-
Method Details
-
getElevateWordList
public List<org.codelibs.fess.opensearch.config.exentity.ElevateWord> getElevateWordList(ElevateWordPager elevateWordPager) Retrieves a paginated list of elevate words based on the provided pager criteria.- Parameters:
elevateWordPager- the pager containing pagination and filtering criteria- Returns:
- list of elevate words matching the criteria
-
getElevateWord
public org.dbflute.optional.OptionalEntity<org.codelibs.fess.opensearch.config.exentity.ElevateWord> getElevateWord(String id) Retrieves a specific elevate word by its ID, including associated label type information.- Parameters:
id- the unique identifier of the elevate word- Returns:
- OptionalEntity containing the elevate word if found, or empty if not found
-
store
public void store(org.codelibs.fess.opensearch.config.exentity.ElevateWord elevateWord) Stores (inserts or updates) an elevate word and manages its associated label type mappings.- Parameters:
elevateWord- the elevate word entity to store
-
delete
public void delete(org.codelibs.fess.opensearch.config.exentity.ElevateWord elevateWord) Deletes an elevate word from the system.- Parameters:
elevateWord- the elevate word entity to delete
-
setupListCondition
protected void setupListCondition(org.codelibs.fess.opensearch.config.cbean.ElevateWordCB cb, ElevateWordPager elevateWordPager) Sets up the condition builder for querying elevate words based on pager criteria.- Parameters:
cb- the condition builder to configureelevateWordPager- the pager containing search criteria
-
importCsv
Imports elevate words from a CSV file. Expected CSV format: SuggestWord, Reading, Permissions, Labels, Boost- Parameters:
reader- the Reader containing CSV data to import
-
exportCsv
Exports elevate words to a CSV file. CSV format: SuggestWord, Reading, Permissions, Labels, Boost- Parameters:
writer- the Writer to output CSV data to
-