Class OpenSearchConfig

java.lang.Object
com.atlassian.confluence.plugins.opensearch.OpenSearchConfig
All Implemented Interfaces:
SearchPlatformConfig, SearchInfo, SearchInfo.OpenSearchInfo

@ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault public class OpenSearchConfig extends Object implements SearchPlatformConfig, SearchInfo.OpenSearchInfo
Application config for configuring OpenSearch
Since:
8.6
  • Constructor Details

    • OpenSearchConfig

      public OpenSearchConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)
  • Method Details

    • refresh

      public void refresh()
    • getHttpUrl

      public String getHttpUrl()
      Specified by:
      getHttpUrl in interface SearchInfo.OpenSearchInfo
      Returns:
      the HTTP URL of the OpenSearch server
    • getIndexName

      public String getIndexName(Index index)
    • getContentIndexName

      public String getContentIndexName()
    • getChangeIndexName

      public String getChangeIndexName()
    • getCustomIndexPrefix

      public String getCustomIndexPrefix()
    • getJournalIndexName

      public String getJournalIndexName()
    • getUsernamePassword

      public Optional<org.apache.commons.lang3.tuple.Pair<String,String>> getUsernamePassword()
    • getAWSRegion

      public Optional<String> getAWSRegion()
    • getConnectRequestTimeout

      public Integer getConnectRequestTimeout()
    • getConnectTimout

      public Integer getConnectTimout()
    • getSocketTimeout

      public Integer getSocketTimeout()
    • getDfsQueryThenFetch

      public boolean getDfsQueryThenFetch()
    • getMaxSearchResults

      public Integer getMaxSearchResults()
    • getMaxConnectionTotal

      public Integer getMaxConnectionTotal()
    • getMaxConnectionPerRoute

      public Integer getMaxConnectionPerRoute()
    • getScanPageSize

      public final Integer getScanPageSize()
    • getCustomDictionaryPath

      public Optional<String> getCustomDictionaryPath()
    • getPointInTimeKeepAlive

      public Duration getPointInTimeKeepAlive()
    • getMaxHighlightMaxAnalyzedOffset

      public String getMaxHighlightMaxAnalyzedOffset()
    • isSharedIndex

      public boolean isSharedIndex()
      Description copied from interface: SearchPlatformConfig
      Indicate whether indices are shared between nodes in cluster
      Specified by:
      isSharedIndex in interface SearchPlatformConfig
      Returns:
      true is indices are shared otherwise false
    • searchPlatform

      public SearchPlatform searchPlatform()
      Specified by:
      searchPlatform in interface SearchInfo
      Specified by:
      searchPlatform in interface SearchPlatformConfig
      Returns:
      the search platform configured on this instance
    • getOpenSearchInfo

      public Optional<SearchInfo.OpenSearchInfo> getOpenSearchInfo()
      Specified by:
      getOpenSearchInfo in interface SearchInfo
      Returns:
      the OpenSearch information if this instance is configured with OpenSearch, otherwise empty