Introduction
This module holds all the common features, shared by the different search modules.
Development
Core
Entity Definitions
The definitions in this module have id discriminators in the range 340-360 |
The IndexedPropertyQueryConfigEntityDefinition defines a search properties' query configuration for the search index. It extends the AbstractEntityDefinition:

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:
Property | Description |
---|---|
indexedProperty |
stores an instance of the |
indexQueryConfig |
stores the respective |
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 |
The IndexModeDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

The index mode operations, defined here, are 2 - DIRECT
and TWO_PHASE
.
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:

The searchIndexConfig
getter-setter pair lets you store/retrieve from the database the search index configuration for the site.
The SearchIndexBuilderConfigEntityDefinition defines the search index configuration. It extends the AbstractEntityDefinition:

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 |
The role of the SearchIndexConfigEntityDefinition is to configure a facet search. It extends the AbstractEntityDefinition:

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 |
The role of the SearchIndexedPropertyEntityDefinition is to define a search property in the search index. It extends the AbstractEntityDefinition and the AbstractNameableEntityDefinition :

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 |
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 |
The role of the SearchIndexedTypeEntityDefinition is to define an index type for the search. It extends the AbstractEntityDefinition:

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 |
The role of the SearchIndexQueryConfigEntityDefinition is to define the search configuration. It extends the AbstractEntityDefinition:

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 |
The SearchPropertyTypeDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

The enumerated values define the types of search index properties - BOOLEAN
, INT
, STRING
, SORTABLETEXT
, TEXT
, FLOAT
, DOUBLE
, DATE
or CURRENCY
The role of the SearchServerConfigEntityDefinition is to define the search server configuration. It extends the AbstractEntityDefinition:

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 |
The SortDirectionDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

The sort direction of the search results is either ascending - ASC
or descending - DESC
.
Facet-related definitions
The FacetValuesSorterEnumDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

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
).
The SearchFacetCategoryConfigEntityDefinition defines the search facet JPA entity. It extends the AbstractEntityDefinition:

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 |
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 |
The SearchFacetEntityDefinition defines the search facet JPA entity. It extends the AbstractEntityDefinition and the AbstractNameableEntityDefinition :

The facetCategoryConfigurations
getter-setter pair lets you store/retrieve from the database a list of SearchFacetCategoryConfigEntityDefinition
-s.
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:

The searchFacetCategoryConfigurations
getter-setter pair lets you store/retrieve from the database a list of SearchFacetCategoryConfigEntityDefinition
instances.
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:

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:

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 ( |
The SearchMatchOperatorEnumDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

The possible selectors are 2 - AND
and OR
Keyword-related definitions
The CategoryKeywordDestinationEntityDefinition extends the SearchKeywordDestinationEntityDefinition and the AbstractEntityDefinition:

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

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

The types of match per search keyword, stored in an enumerated list, are EXACT
, STARTS_WITH
and ENDS_WITH
.
The SearchKeywordRedirectEntityDefinition defines the search keyword redirect entity. It extends the AbstractEntityDefinition:

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 ( |
searchKeywordDestination |
stores the keyword destination for the search |
The UrlKeywordDestinationEntityDefinition extends the SearchKeywordDestinationEntityDefinition and the AbstractEntityDefinition:

The url
getter-setter pair lets you store/retrieve from the database the URL for the keyword destination.
Spring Data JPA Repositories
Search Repositories
The BaseSearchRepository extends the Spring PagingAndSortingRepository and is the corresponding Spring Data JPA repository for the SearchRequestDtoDefinition
:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

-
Keyword-related Repositories
The CategoryKeywordDestinationRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the CategoryKeywordDestinationEntityDefinition

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

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

Business Services
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.
The KeywordRedirectService is related to the SearchKeywordRedirectEntityDefinition
. The defined getKeywordRedirect()
method resolves a keyword redirect url by the given search term.
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
The FacetSearchPageMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the Spring Data Page interface to FacetSearchPageDtoDefinition
:

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

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

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

Dto definitions
The AbstractSearchPageDtoDefinition is a base Dto that defines common properties for search result pages.
The AutocompleteSearchDtoDefinition is a base Dto class for the autocomplete search queries. It extends the basic SearchDtoDefinition:

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

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:

The SearchPageBreadcrumbDtoDefinition extends the AbstractSearchPageDtoDefinition:

The SearchPageFacetsDtoDefinition extends the AbstractSearchPageDtoDefinition:

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:

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

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

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:

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

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

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

Facades
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. |