Introduction

This module holds all the common features, shared by the different search modules.

Business

Development

Core

Entity Definitions

The definitions in this module have id discriminators in the range 340-360

IndexedPropertyQueryConfigEntityDefinition

The IndexedPropertyQueryConfigEntityDefinition defines a search properties' query configuration for the search index. It extends the AbstractEntityDefinition:

asciidoctor diagram IndexedPropertyQueryConfigEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

indexedProperty

stores an instance of the SearchIndexedPropertyEntityDefinition

indexQueryConfig

stores the respective SearchIndexQueryConfigEntityDefinition for the search index property

boost

stores the boost value for the property

fuzziness

stores the likely to be relevant to the entered search argument

searchFacet

stores the search facet for the search index property

sortable

stores information if the property is sortable or not

sortDirection

stores the default sort direction when searching

highlight

returns true if the property is used for highlight

IndexModeDefinition

The IndexModeDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram IndexModeDefinition

The index mode operations, defined here, are 2 - DIRECT and TWO_PHASE.

SearchableSiteEntityDefinition

The SearchableSiteEntityDefinition is a mix-in definition that enriches the SiteEntityDefinition with search-related attributes. Apart form the SiteEntityDefinition, it also extends the AbstractEntityEnum and the AbstractDescriptionableEntityDefinition:

asciidoctor diagram SearchableSiteEntityDefinition

The searchIndexConfig getter-setter pair lets you store/retrieve from the database the search index configuration for the site.

SearchIndexBuilderConfigEntityDefinition

The SearchIndexBuilderConfigEntityDefinition defines the search index configuration. It extends the AbstractEntityDefinition:

asciidoctor diagram SearchIndexBuilderConfigEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

indexName

stores the name of the search index

batchSize

stores the the size of the batch at which the indexing will be performed

exportPath

stores the path towards which the export will be

indexMode

stores the mode for indexation

exportUrls

stores, as a List of strings, the manually defined URLs that will be exported to the search server

SearchIndexConfigEntityDefinition

The role of the SearchIndexConfigEntityDefinition is to configure a facet search. It extends the AbstractEntityDefinition:

asciidoctor diagram SearchIndexConfigEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

name

stores the name of the facet search configuration

description

stores the description of the facet search configuration

searchServerConfig

stores the search server configuration for the facet search configuration

searchIndexQueryConfig

stores the search index configuration for this facet search configuration

searchIndexBuilderConfig

stores the indexing configuration for the facet search configuration

indexNamePrefix

stores the index name prefix

searchIndexedType

stores a list of search index types for the facet search configuration

locales

stores a set of supported locales for this facet search configuration

SearchIndexedPropertyEntityDefinition

The role of the SearchIndexedPropertyEntityDefinition is to define a search property in the search index. It extends the AbstractEntityDefinition and the AbstractNameableEntityDefinition :

asciidoctor diagram SearchIndexedPropertyEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

type

stores the type of the property (an instance of the SearchPropertyTypeDefinition)

indexedType

stores the search index type the property belongs to

localized

stores information if the property is localized or not

currency

stores information if the property is currency or not

multiValue

stores information if the property is multi-value or not

indexedPropertyQueryConfigurations

stores the query configuration for the indexed property

SearchIndexedTypeEntityDefinition

The role of the SearchIndexedTypeEntityDefinition is to define an index type for the search. It extends the AbstractEntityDefinition:

asciidoctor diagram SearchIndexedTypeEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

searchIndexedProperties

stores a set of search index properties for the search index type

searchIndexConfig

stores the search facet configuration the search index type belongs to

SearchIndexQueryConfigEntityDefinition

The role of the SearchIndexQueryConfigEntityDefinition is to define the search configuration. It extends the AbstractEntityDefinition:

asciidoctor diagram SearchIndexQueryConfigEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

pageSize

stores the default page size when searching

maxPageSize

stores the maximum page size when searching

defaultSorts

stores a list of strings to sort by when searching

defaultSortDirection

stores the default sort direction when searching

relevanceSortField

stores the name of the relevance sort field

groupingField

stores the field on which to perform grouping when searching

groupingLimit

stores the limit of the performed grouping

highlightFragmentSize

stores the highlight fragment size

highlightNumOfFragments

stores the maximum highlight number of fragments

highlightTag

stores the HTML tag for highlighting the results

multiTermOperator

stores the operator for a logical match clause on search

fuzzyMaxExpansions

stores the maximum allowed expansion on fuzzy search

SearchPropertyTypeDefinition

The SearchPropertyTypeDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram SearchPropertyTypeDefinition

The enumerated values define the types of search index properties - BOOLEAN, INT, STRING, SORTABLETEXT, TEXT, FLOAT, DOUBLE, DATE or CURRENCY

SearchServerConfigEntityDefinition

The role of the SearchServerConfigEntityDefinition is to define the search server configuration. It extends the AbstractEntityDefinition:

asciidoctor diagram SearchServerConfigEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

endpointUrls

stores a collection of strings to define the endpoints for the search server configuration

clusterName

stores the name of the search server cluster

SortDirectionDefinition

The SortDirectionDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram SortDirectionDefinition

The sort direction of the search results is either ascending - ASC or descending - DESC.

FacetValuesSorterEnumDefinition

The FacetValuesSorterEnumDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram FacetValuesSorterEnumDefinition

The enumerated list stores the values that define the available sorters for facet values - in alphabetical order, in numeric order and by the number of hits, in ascending or descending order, respectively (NUMERIC_ASC, NUMERIC_DESC, ALPHA_ASC, ALPHA_DESC, HITS_ASC or HITS_DESC).

SearchFacetCategoryConfigEntityDefinition

The SearchFacetCategoryConfigEntityDefinition defines the search facet JPA entity. It extends the AbstractEntityDefinition:

asciidoctor diagram SearchFacetCategoryConfigEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

facetProfile

stores the profile of the facet the configuration is for (an instance of SearchFacetProfileEntityDefinition)

searchFacet

stores the search facet the configuration is for

facetValuesSorter

stores the sorting value

weight

stores the weight of the facet (the order in which it will be displayed)

visible

stores information if the facet is visible for the config’s category or not

color

stores true if the term for the facet is a color

maxShownFacetValues

stores the maximum facet values to be shown in the facet. If the returned facet values are more than this limit, the values after the limit will be hidden. The returned value is the minimum length of the term for this facet.

category

stores the category the search facet config if for

SearchFacetEntityDefinition

The SearchFacetEntityDefinition defines the search facet JPA entity. It extends the AbstractEntityDefinition and the AbstractNameableEntityDefinition :

asciidoctor diagram SearchFacetEntityDefinition

The facetCategoryConfigurations getter-setter pair lets you store/retrieve from the database a list of SearchFacetCategoryConfigEntityDefinition -s.

SearchFacetProfileEntityDefinition

The SearchFacetProfileEntityDefinition is a base entity definition that defines a facet’s behaviour. It should be extended by all concrete facet profiles. The SearchFacetProfileEntityDefinition extends the AbstractEntityDefinition:

asciidoctor diagram SearchFacetProfileEntityDefinition

The searchFacetCategoryConfigurations getter-setter pair lets you store/retrieve from the database a list of SearchFacetCategoryConfigEntityDefinition instances.

SearchFacetSliderProfileEntityDefinition

The SearchFacetSliderProfileEntityDefinition is a base entity definition that defines a facet’s behaviour. It should be extended by all concrete facet profiles. It extends the SearchFacetProfileEntityDefinition and the AbstractEntityDefinition:

asciidoctor diagram SearchFacetSliderProfileEntityDefinition
SearchFacetTermProfileEntityDefinition

The SearchFacetTermProfileEntityDefinition is a base entity definition that defines a facet’s behaviour. It should be extended by all concrete facet profiles. It extends the SearchFacetProfileEntityDefinition and the AbstractEntityDefinition:

asciidoctor diagram SearchFacetTermProfileEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

isMultiSelect

stores information if the search facet is multi select or not

multiSelectOperator

stores the respective select operator (AND or OR)

SearchMatchOperatorEnumDefinition

The SearchMatchOperatorEnumDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram SearchMatchOperatorEnumDefinition

The possible selectors are 2 - AND and OR

CategoryKeywordDestinationEntityDefinition

The CategoryKeywordDestinationEntityDefinition extends the SearchKeywordDestinationEntityDefinition and the AbstractEntityDefinition:

asciidoctor diagram CategoryKeywordDestinationEntityDefinition

The category getter-setter pair lets you store/retrieve from the database the category the search is for.

SearchKeywordDestinationEntityDefinition

The SearchKeywordDestinationEntityDefinition extends the AbstractEntityDefinition:

asciidoctor diagram SearchKeywordDestinationEntityDefinition
SearchKeywordMatchTypeDefinition

The SearchKeywordMatchTypeDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram SearchKeywordMatchTypeDefinition

The types of match per search keyword, stored in an enumerated list, are EXACT, STARTS_WITH and ENDS_WITH.

SearchKeywordRedirectEntityDefinition

The SearchKeywordRedirectEntityDefinition defines the search keyword redirect entity. It extends the AbstractEntityDefinition:

asciidoctor diagram SearchKeywordRedirectEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

keyword

stores the keyword the search is based on

matchType

stores the type of match per search keyword (EXACT, STARTS_WITH and ENDS_WITH)

searchKeywordDestination

stores the keyword destination for the search

asciidoctor diagram UrlKeywordDestinationEntityDefinition

The url getter-setter pair lets you store/retrieve from the database the URL for the keyword destination.

Spring Data JPA Repositories

Search Repositories
BaseSearchRepository

The BaseSearchRepository extends the Spring PagingAndSortingRepository and is the corresponding Spring Data JPA repository for the SearchRequestDtoDefinition:

asciidoctor diagram BaseSearchRepository
CmsSearchRepository

The CmsSearchRepository extends the BaseEntityRepository, hence - the Spring PagingAndSortingRepository. This is a search repository for content.

asciidoctor diagram CmsSearchRepository
ProductSearchRepository

The ProductSearchRepository extends the BaseEntityRepository, hence - the Spring PagingAndSortingRepository. This is a search repository for the products

asciidoctor diagram ProductSearchRepository
StoreSearchRepository

The StoreSearchRepository extends the BaseEntityRepository, hence - the Spring PagingAndSortingRepository. This is a search repository for the point-of-services.

asciidoctor diagram StoreSearchRepository
DataBase Repositories
IndexedPropertyQueryConfigRepository

The IndexedPropertyQueryConfigRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchFacetCategoryConfigEntityDefinition:

asciidoctor diagram IndexedPropertyQueryConfigRepository
SearchConfigRepository

The SearchConfigRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchIndexQueryConfigEntityDefinition:

asciidoctor diagram SearchConfigRepository
SearchFacetCategoryConfigRepository

The SearchFacetCategoryConfigRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchFacetCategoryConfigEntityDefinition:

asciidoctor diagram SearchFacetCategoryConfigRepository
SearchFacetProfileRepository

The SearchFacetProfileRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchFacetProfileEntityDefinition:

asciidoctor diagram SearchFacetProfileRepository
SearchFacetRepository

The SearchFacetRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchFacetEntityDefinition:

asciidoctor diagram SearchFacetRepository
SearchFacetSliderProfileRepository

The SearchFacetSliderProfileRepository extends SearchFacetProfileRepository and the BaseEntityRepository. This is the corresponding Spring Data JPA repository for the SearchFacetSliderProfileEntityDefinition:

asciidoctor diagram SearchFacetSliderProfileRepository
SearchFacetTermProfileRepository

The SearchFacetTermProfileRepository extends SearchFacetProfileRepository and the BaseEntityRepository. This is the corresponding Spring Data JPA repository for the SearchFacetTermProfileEntityDefinition:

asciidoctor diagram SearchFacetTermProfileRepository
SearchIndexBuilderConfigRepository

The SearchIndexBuilderConfigRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchIndexBuilderConfigEntityDefinition:

asciidoctor diagram SearchIndexBuilderConfigRepository
SearchIndexConfigRepository

The SearchIndexConfigRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchIndexConfigEntityDefinition:

asciidoctor diagram SearchIndexConfigRepository
SearchIndexedPropertyRepository

The SearchIndexedPropertyRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchIndexedPropertyEntityDefinition

asciidoctor diagram SearchIndexedPropertyRepository
SearchIndexedTypeRepository

The SearchIndexedTypeRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchIndexedTypeEntityDefinition:

asciidoctor diagram SearchIndexedTypeRepository
SearchKeywordDestinationRepository

The SearchKeywordDestinationRepositoryextends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchKeywordDestinationEntityDefinition:

asciidoctor diagram SearchKeywordDestinationRepository
SearchKeywordRedirectRepository

The SearchKeywordRedirectRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchKeywordRedirectEntityDefinition:

asciidoctor diagram SearchKeywordRedirectRepository
SearchServerConfigRepository

The SearchServerConfigRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchServerConfigEntityDefinition:

asciidoctor diagram SearchServerConfigRepository
  • Keyword-related Repositories

CategoryKeywordDestinationRepository

The CategoryKeywordDestinationRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the CategoryKeywordDestinationEntityDefinition

asciidoctor diagram CategoryKeywordDestinationRepository
SearchPageKeywordRedirectRepository

The SearchPageKeywordRedirectRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SearchKeywordRedirectEntityDefinition:

asciidoctor diagram SearchPageKeywordRedirectRepository
UrlKeywordDestinationRepository

The UrlKeywordDestinationRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the UrlKeywordDestinationEntityDefinition:

asciidoctor diagram UrlKeywordDestinationRepository

Business Services

FacetSearchService

Among the helper functionalities, defined within the FacetSearchService, are:

Description Method

to perform full-text search with the supplied search page request

search()

to perform autocomplete search with the supplied search term

autocompleteSearch()

to retrieve a facet config

findFacetConfig()

The FacetSearchService performs search operations on a search index.

KeywordRedirectService

The KeywordRedirectService is related to the SearchKeywordRedirectEntityDefinition. The defined getKeywordRedirect() method resolves a keyword redirect url by the given search term.

SearchConfigService

Among the helper functionalities, defined within the SearchConfigService, are:

Description Method

to obtain the search configuration for the given code

getConfiguration()

to obtain the current site’s configuration

getConfiguration()

to obtain search index property

getIndexedPropertyForIndexType()

to obtain a collection of all search index properties

getIndexedPropertiesForIndexedType()

to obtain a collection of facet search index properties

getFacetPropertyConfigsForIndexedType()

to obtain a collection of search index properties used for autocomplete

getAutocompletePropertiesForIndexedType()

to obtain a collection of search index properties used for the highlight

getHighlightPropertiesForIndexedType()

to obtain the name of the given search index property entity

getPropertyName()

Facade

MapperFactoryConfigurers

FacetSearchPageMapperFactoryConfigurer

The FacetSearchPageMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the Spring Data Page interface to FacetSearchPageDtoDefinition:

asciidoctor diagram FacetSearchPageMapperFactoryConfigurer
SearchStoreLocatorStoreMapperFactoryConfigurer

The SearchStoreLocatorStoreMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the SearchRequestStoreDtoDefinition to StoreDtoDefinition:

asciidoctor diagram SearchStoreLocatorStoreMapperFactoryConfigurer
SearchStoreMapperFactoryConfigurer

The SearchStoreMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the SearchRequestStoreDtoDefinition to StoreDtoDefinition:

asciidoctor diagram SearchStoreMapperFactoryConfigurer
StoreSearchMapperFactoryConfigurer

The StoreSearchMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the SearchRequestStoreDtoDefinition to StoreDtoDefinition:

asciidoctor diagram StoreSearchMapperFactoryConfigurer

Dto definitions

AbstractSearchPageDtoDefinition

The AbstractSearchPageDtoDefinition is a base Dto that defines common properties for search result pages.

AutocompleteSearchDtoDefinition

The AutocompleteSearchDtoDefinition is a base Dto class for the autocomplete search queries. It extends the basic SearchDtoDefinition:

asciidoctor diagram AutocompleteSearchDtoDefinition
FacetSearchPageDtoDefinition

The FacetSearchPageDtoDefinition extends the AbstractSearchPageDtoDefinition and the Page interface. This is the corresponding Dto object for the Spring Data Page interface:

asciidoctor diagram FacetSearchPageDtoDefinition
SearchFacetPageRequest

The SearchFacetPageRequest extends the SearchPageRequest and adds some additional attributes that hold the facets we want to search for, the category code we want to search in, the layout we want to get the results in, etc:

asciidoctor diagram SearchFacetPageRequest
SearchPageBreadcrumbDtoDefinition

The SearchPageBreadcrumbDtoDefinition extends the AbstractSearchPageDtoDefinition:

asciidoctor diagram SearchPageBreadcrumbDtoDefinition
SearchPageFacetsDtoDefinition

The SearchPageFacetsDtoDefinition extends the AbstractSearchPageDtoDefinition:

asciidoctor diagram SearchPageFacetsDtoDefinition
SearchPageRequest

The SearchPageRequest extends the Spring Data PageRequest. It holds the search term we are searching for, as well as the search type we are searching for:

asciidoctor diagram SearchPageRequest
SearchQueryRangeDtoDefinition

The SearchQueryRangeDtoDefinition extends the SearchQueryDtoDefinition and adds some additional attributes that hold the minimum and maximum allowed length for the query term:

asciidoctor diagram SearchQueryRangeDtoDefinition
SearchQueryTermDtoDefinition

The SearchQueryTermDtoDefinition extends the SearchQueryDtoDefinition. The additionally added attribute holds the value for the search term:

asciidoctor diagram SearchQueryTermDtoDefinition
SearchRequestCmsDtoDefinition

The SearchRequestCmsDtoDefinition extends the SearchRequestDtoDefinition. The additionally added attributes hold the CMS-related information, such as the URL, the title of the site, the content:

asciidoctor diagram SearchRequestCmsDtoDefinition
SearchRequestDtoDefinition

The SearchRequestDtoDefinition is a basic class for all the search requests.

SearchRequestProductDtoDefinition

The SearchRequestProductDtoDefinition extends the SearchRequestDtoDefinition. This is the base class for all product search requests that adds the respective product-related attributes:

asciidoctor diagram SearchRequestProductDtoDefinition
SearchRequestStoreDtoDefinition

The SearchRequestStoreDtoDefinition extends the SearchRequestDtoDefinition. This is a base class for the point-of-service export that adds the respective store-related attributes:

asciidoctor diagram SearchRequestStoreDtoDefinition
TermsFacetDto

The TermsFacetDto extends the FacetDto. It adds some search term’s-related attributes

asciidoctor diagram TermsFacetDto

Facades

SearchFacade

The SearchFacade holds helper methods related to SearchDtoDefinition.

Configuration

Name Type Description

nemesis.search.default-decimal-format

java.lang.String

The default decimal format that is used to parse decimal numbers.

nemesis.search.default-index-currency

java.lang.String

The currency in which all monetary amounts are stored in the index.

nemesis.search.default-layout

java.lang.String

Name of the URL query string parameter that indicated what the layout must be.

nemesis.search.default-max-shown-facet-values

java.lang.Integer

Default number of facet’s values to be shown (aka Buckets). If facet has more values than its current MaxShownFacetValues, only the top values (according to its values-sorting rule /by default by Bucket-count/) will be shown.

nemesis.search.default-query-name

java.lang.String

The default search query name to use.

nemesis.search.default-search-type

java.lang.String

The default search type being performed. If not specified in the search query.

nemesis.search.export.chunk-size

java.lang.Integer

The default chunk size for search export.

nemesis.search.export.pool-size

java.lang.Integer

The number of threads to perform search export with.