Podcast
Questions and Answers
What search functionality does Configured Commerce use by default for storefronts?
What search functionality does Configured Commerce use by default for storefronts?
What does the CreateElasticsearchCategory operation do in the search pipeline?
What does the CreateElasticsearchCategory operation do in the search pipeline?
What kind of query does GetIndexableCategoriesQuery create?
What kind of query does GetIndexableCategoriesQuery create?
Under what conditions does MapElasticSearchCategoryCustomProperties set result.Property?
Under what conditions does MapElasticSearchCategoryCustomProperties set result.Property?
Signup and view all the answers
What does the InitializeSearchProperties operation retrieve?
What does the InitializeSearchProperties operation retrieve?
Signup and view all the answers
Which version of Elasticsearch should be referred to for updated search pipelines?
Which version of Elasticsearch should be referred to for updated search pipelines?
Signup and view all the answers
What action is performed by the RunCategorySearch operation?
What action is performed by the RunCategorySearch operation?
Signup and view all the answers
What does the term 'IndexableCategories' refer to in the context of the search pipeline?
What does the term 'IndexableCategories' refer to in the context of the search pipeline?
Signup and view all the answers
What is the purpose of using the result.DisallowedCategories List in the cache key?
What is the purpose of using the result.DisallowedCategories List in the cache key?
Signup and view all the answers
Which filter is applied to restrict search results to a specific language?
Which filter is applied to restrict search results to a specific language?
Signup and view all the answers
What will happen if result.SiteContext.WebsiteDto is null?
What will happen if result.SiteContext.WebsiteDto is null?
Signup and view all the answers
How does the Parameter.AddTypeFilter function in the search process?
How does the Parameter.AddTypeFilter function in the search process?
Signup and view all the answers
What does the CombineFilters operation do with result.AllFilters?
What does the CombineFilters operation do with result.AllFilters?
Signup and view all the answers
When creating a MultiMatchQuery search type, what is the source of the query?
When creating a MultiMatchQuery search type, what is the source of the query?
Signup and view all the answers
What is the purpose of the FunctionScoreQuery in the search process?
What is the purpose of the FunctionScoreQuery in the search process?
Signup and view all the answers
What type of query does FormFuzzySearch create in the search process?
What type of query does FormFuzzySearch create in the search process?
Signup and view all the answers
What is the first action taken if 'result.SearchResponse.Aggregations' does not contain 'PerformSearch.ContentAggregationKey'?
What is the first action taken if 'result.SearchResponse.Aggregations' does not contain 'PerformSearch.ContentAggregationKey'?
Signup and view all the answers
What happens to 'result.ContentSearchResults' if it is found to be empty?
What happens to 'result.ContentSearchResults' if it is found to be empty?
Signup and view all the answers
Which key is used to create new instances of 'ContentSearchResultDto'?
Which key is used to create new instances of 'ContentSearchResultDto'?
Signup and view all the answers
What is selected from 'result.SearchResponse' after checking 'result.SearchResponse.Aggregations'?
What is selected from 'result.SearchResponse' after checking 'result.SearchResponse.Aggregations'?
Signup and view all the answers
If 'PerformSearch.TopHitsAggregationKey' does not yield a result, what is the next probable step?
If 'PerformSearch.TopHitsAggregationKey' does not yield a result, what is the next probable step?
Signup and view all the answers
Which of the following occurs when 'result.SearchResponse.Hits' is not null?
Which of the following occurs when 'result.SearchResponse.Hits' is not null?
Signup and view all the answers
What does 'result.SearchResponse.Aggregations' hold in the context of processing?
What does 'result.SearchResponse.Aggregations' hold in the context of processing?
Signup and view all the answers
Which variable is assigned the collection of new 'ContentSearchResultDto' after processing?
Which variable is assigned the collection of new 'ContentSearchResultDto' after processing?
Signup and view all the answers
What is the purpose of combining individual FieldQueries into a BooleanQuery using Operation.Or?
What is the purpose of combining individual FieldQueries into a BooleanQuery using Operation.Or?
Signup and view all the answers
Which of the following conditions will cause the query to skip to the next pipe?
Which of the following conditions will cause the query to skip to the next pipe?
Signup and view all the answers
What does the result.ProductIdFilter contain after combining FieldQueries?
What does the result.ProductIdFilter contain after combining FieldQueries?
Signup and view all the answers
What happens if result.AllFilters is empty?
What happens if result.AllFilters is empty?
Signup and view all the answers
How are filters from parameter.ProductSearchParameter.ProductErpNumbers processed?
How are filters from parameter.ProductSearchParameter.ProductErpNumbers processed?
Signup and view all the answers
What role does the IPerRequestCacheManager play in the filtering process?
What role does the IPerRequestCacheManager play in the filtering process?
Signup and view all the answers
Which operation is used to combine all filters in result.AllFilters into one?
Which operation is used to combine all filters in result.AllFilters into one?
Signup and view all the answers
What is the result of executing a FieldQuery against the ISearchProductObject.Name field?
What is the result of executing a FieldQuery against the ISearchProductObject.Name field?
Signup and view all the answers
What should be done if 'ProductLinesEnabled' is true and there are brands with non-empty 'ProductLineName'?
What should be done if 'ProductLinesEnabled' is true and there are brands with non-empty 'ProductLineName'?
Signup and view all the answers
What happens if 'parameter.Criteria' is null?
What happens if 'parameter.Criteria' is null?
Signup and view all the answers
What is the purpose of creating the variable 'queryWords'?
What is the purpose of creating the variable 'queryWords'?
Signup and view all the answers
What should be done to brands that do not match any 'queryWords'?
What should be done to brands that do not match any 'queryWords'?
Signup and view all the answers
What is the outcome of grouping 'result.BrandSearchResult.Brands' by 'Id' and 'ProductLineId'?
What is the outcome of grouping 'result.BrandSearchResult.Brands' by 'Id' and 'ProductLineId'?
Signup and view all the answers
What is the function of the ProductSearchPipeline's FormProductFilter pipeline?
What is the function of the ProductSearchPipeline's FormProductFilter pipeline?
Signup and view all the answers
What condition leads to skipping to the next processing pipe without taking action?
What condition leads to skipping to the next processing pipe without taking action?
Signup and view all the answers
What does the initialization process with Dependency Injection attach to the result object?
What does the initialization process with Dependency Injection attach to the result object?
Signup and view all the answers
Study Notes
Search Pipeline
- Configured Commerce uses Elasticsearch version 5.5 (Nest5) for search functionality on customer storefronts.
- The pipelines outlined apply only to Elasticsearch version 5.5 (Nest5).
- If upgrading to or using Elasticsearch version 7.10 (Nest7), refer to the Third-party search pipelines.
CategoryIndexerPipeline
-
CreateElasticsearchCategory: This pipe creates a new ElasticsearchCategory object using the fields from the parameter object and assigns it to
result.ElasticsearchCategory
. -
GetIndexableCategoriesQuery: This pipe creates an Entity Framework Category query using the parameter object's fields and assigns it to
result.IndexableCategories
. -
MapElasticSearchCategoryCustomProperties: This pipe sets
result.Property
to a new Nest TextProperty if theparameter.SearchBoost.IsQueryable
andparameter.PropertyDefinition.IsCustomProperty
are both true.
CategorySearchPipeline
- InitializeSearchProperties: Retrieves the current SiteContext, ElasticsearchIndex, and ElasticsearchQueryBuilder and assigns them to the result object. The cache key is based on "CategorySearchDisallowedCategories + ".
-
FormCategoryExcludeFilter: Uses the
result.DisallowedCategories
list to filter out categories generated during theFormCategoryExcludeList
pipe processing. -
FormLanguageFilter: Uses
result.SiteContext.LanguageDto
to filter search results to a specific LanguageCode. If this pipe isn't processed, it will include results from all languages. -
FormWebsiteFilter: Uses
result.SiteContext.WebsiteDto
to filter search results to a specific Website. Ifresult.SiteContext.WebsiteDto
is null, it will cause a Pipeline exception/error. -
FormTypeFilter: This pipe adds a Query Filter for 'type' equaling 'category' if
Parameter.AddTypeFilter
is true. -
CombineFilters: This pipe combines all the filters in
result.AllFilters
into a single SearchQuery with an Operation of 'And' and sets the query toresult.CombinedFilter
. If no filters are found,result.CombinedFilter
will be set tonull
. -
FormMainSearchQuery: This pipe creates a SearchQuery from
result.CategorySearchFields
against the parameter.Criteria query value for a MultiMatchQuery & MultiMatchPrefixQuery search type. -
FormFuzzySearchQuery: This pipe creates a SearchQuery from
result.CategorySearchFields
against the parameter.Criteria query value for a MultiMatchFuzzyQuery search type. -
CombineQueries: Combines all the queries in
result.AllQueries
into a single SearchQuery with an Operation of 'Or' and sets the query toresult.CombinedQuery
. - ApplyQueryAndFilter: Creates a FunctionScoreQuery attaching as a new SearchDescriptor. The Score Function is for the Boost Field with a FunctionBoostMode.Multiply boost function.
-
ProcessSearchResponse: If the
result.SearchResponse.Aggregations
does not containPerformSearch.ContentAggregationKey
, continues to the next pipe. Selects fromPerformSearch.ContentAggregationKey
Items, anyPerformSearch.TopHitsAggregationKey
using theparameter.SearchContentMapper.ToContentSearchResultDto
to create newContentSearchResultDto
, and assigns the resulting collection toresult.ContentSearchResults
. -
ProcessSearchResponseForAllAggregations: If the
result.SearchResponse.Aggregations
does not containPerformSearch.ContentAggregationKey
, continues to the next pipe. Selects fromresult.SearchResponse.Aggregations
allPerformSearch.TopHitsAggregationKey
using theparameter.SearchContentMapper.ToContentSearchResultDto
to create newContentSearchResultDto
, and assigns the resulting collection toresult.ContentSearchResults
. -
ProcessSearchResponseFromResult: If
result.ContentSearchResults
is empty, continues to the next pipe. Selects fromresult.SearchResponse.Hits
all not null using theparameter.SearchContentMapper.ToContentSearchResultDto
to create newContentSearchResultDto
, and assigns the resulting collection toresult.ContentSearchResults
.
FormProductIdFilter
- Makes a FieldQuery for each product in
parameter.ProductSearchParameter.ProductIds
against theISearchProductObject.ProductId
field, combines them into a BooleanQuery using theOperation.Or
, assigns it toresult.ProductIdFilter
, and addsresult.ProductIdFilter
toresult.AllFilters
. - If
parameter.ProductSearchParameter.ProductNames
isnull
or empty, continues to the next pipe.
FormProductNameFilter
- Makes a FieldQuery for each product in
parameter.ProductSearchParameter.ProductNames
against theISearchProductObject.Name
field, combines them into a BooleanQuery using theOperation.Or
, assigns it toresult.ProductNameFilter
, and addsresult.ProductNameFilter
toresult.AllFilters
. - If
parameter.ProductSearchParameter.ProductErpNumbers
isnull
or empty, continues to the next pipe.
FormProductErpNumberFilter
- Makes a FieldQuery for each product in
parameter.ProductSearchParameter.ProductErpNumbers
against theISearchProductObject.ErpNumberSort
field, combines them into a BooleanQuery using theOperation.Or
, assigns it toresult.ProductErpNumberFilter
, and addsresult.ProductErpNumberFilter
toresult.AllFilters
.
CombineFilters
- Makes a BoolQuery with the Operation.And of all filters in
result.AllFilters
and assigns it toresult.CombinedFilter
ornull
if filters are empty.
GetRestrictionGroupFilter
- Attempts to retrieve the Restriction Group filter from the
IPerRequestCacheManager
cache based onparameter.SiteContext.BillTo.Id
andparameter.SiteContext.ShipTo.Id
, and assigns it toresult.RestrictionGroupFilter
. - If
parameter.ProductLinesEnabled
is true and has result.BrandSearchResult.Brands that do not have a blank 'ProductLineName', ordersresult.BrandSearchResult.Brands
using OrderByDescending by 'Score'. - If the prior checks pass, fall back to sorting by
Score
for theparameter.MaximumNumber
. Then set brand results toresult.BrandSearchResult.Brands
. - If
parameter.Criteria
is null,result.BrandSearchResult?.Brands
isnull
, orresult.BrandSearchResult.Brands
allProductLineNames
are empty, continue on to the next pipe.
ProcessProductLines
- Creates a
queryWords
variable by splittingparameter.Criteria
by ' ' (Space). - Nulls the
ProductLineId
,ProductLineName
andProductLineUrlSegement
fields onresult.BrandSearchResult.Brands
for the brand results that don't match anyqueryWords
to'ProductLineName'
. - Also, nulls the fields if
parameter.ProductLinesEnabled
is not true. - Using
result.BrandSearchResult.Brands
group by'Id'
and'ProductLineId'
, selects the first group and takingparameter.MaximumNumber
, then assigns it toresult.BrandSearchResult.Brands
. This removes duplicates.
RunProductFacetSearch
-
InitializeSearchProperties: Uses Dependency Injection to attach
ProductSearchFacetProcessor
, andSearchGeneralSettings
, then assign them to the result object. Sets theIndexType
,SearchClient
, andSearchQueryBuilder
from the parameter to the result. -
FormProductFilter: This pipe uses the
FormProductFilter
pipeline to get the product filter and assign it toresult.FormProductFilterResult
. -
FormBrandStartsWithFilter: If
parameter.ProductFacetSearchParameter.BrandStartsWith
is blank, continue on to the next pipe.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz explores the search pipelines configured for Elasticsearch version 5.5, specifically focusing on the CategoryIndexerPipeline and CategorySearchPipeline. Test your knowledge on the functionalities and properties involved in creating and customizing Elasticsearch categories and search queries.