Search	search pipelines
40 Questions
6 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What search functionality does Configured Commerce use by default for storefronts?

  • Elasticsearch version 5.5 (correct)
  • Apache Solr
  • PostgreSQL
  • MongoDB Atlas

What does the CreateElasticsearchCategory operation do in the search pipeline?

  • Maps properties from a SQL database
  • Indexes a collection of categories
  • Retrieves an existing ElasticsearchCategory
  • Creates a new ElasticsearchCategory object (correct)

What kind of query does GetIndexableCategoriesQuery create?

  • Entity Framework Category query (correct)
  • REST API query for products
  • GraphQL query for orders
  • SQL query for retrieving users

Under what conditions does MapElasticSearchCategoryCustomProperties set result.Property?

<p>When parameter.PropertyDefinition.IsCustomProperty is true (C)</p> Signup and view all the answers

What does the InitializeSearchProperties operation retrieve?

<p>Search indices and properties (B)</p> Signup and view all the answers

Which version of Elasticsearch should be referred to for updated search pipelines?

<p>7.10 (D)</p> Signup and view all the answers

What action is performed by the RunCategorySearch operation?

<p>Retrieves search-related properties (C)</p> Signup and view all the answers

What does the term 'IndexableCategories' refer to in the context of the search pipeline?

<p>Categories that are eligible for search indexing (C)</p> Signup and view all the answers

What is the purpose of using the result.DisallowedCategories List in the cache key?

<p>To filter out specific categories from the search results (B)</p> Signup and view all the answers

Which filter is applied to restrict search results to a specific language?

<p>FormLanguageFilter (B)</p> Signup and view all the answers

What will happen if result.SiteContext.WebsiteDto is null?

<p>It will lead to a Pipeline Exception/Error (A)</p> Signup and view all the answers

How does the Parameter.AddTypeFilter function in the search process?

<p>It adds a type filter for 'category' (D)</p> Signup and view all the answers

What does the CombineFilters operation do with result.AllFilters?

<p>It combines them into a single SearchQuery with 'And' (A)</p> Signup and view all the answers

When creating a MultiMatchQuery search type, what is the source of the query?

<p>result.CategorySearchFields (A)</p> Signup and view all the answers

What is the purpose of the FunctionScoreQuery in the search process?

<p>To attach a Score Function for the Boost Field (D)</p> Signup and view all the answers

What type of query does FormFuzzySearch create in the search process?

<p>MultiMatchFuzzyQuery (A)</p> Signup and view all the answers

What is the first action taken if 'result.SearchResponse.Aggregations' does not contain 'PerformSearch.ContentAggregationKey'?

<p>Continue to the next pipe (D)</p> Signup and view all the answers

What happens to 'result.ContentSearchResults' if it is found to be empty?

<p>The next pipe is executed (D)</p> Signup and view all the answers

Which key is used to create new instances of 'ContentSearchResultDto'?

<p>parameter.SearchContentMapper.ToContentSearchResultDto (C)</p> Signup and view all the answers

What is selected from 'result.SearchResponse' after checking 'result.SearchResponse.Aggregations'?

<p>result.SearchResponse.Hits (B)</p> Signup and view all the answers

If 'PerformSearch.TopHitsAggregationKey' does not yield a result, what is the next probable step?

<p>Continue to the next pipe (D)</p> Signup and view all the answers

Which of the following occurs when 'result.SearchResponse.Hits' is not null?

<p>It creates new instances of 'ContentSearchResultDto' (D)</p> Signup and view all the answers

What does 'result.SearchResponse.Aggregations' hold in the context of processing?

<p>Aggregated search metrics (C)</p> Signup and view all the answers

Which variable is assigned the collection of new 'ContentSearchResultDto' after processing?

<p>result.ContentSearchResults (A)</p> Signup and view all the answers

What is the purpose of combining individual FieldQueries into a BooleanQuery using Operation.Or?

<p>To include products that match any of the specified criteria. (C)</p> Signup and view all the answers

Which of the following conditions will cause the query to skip to the next pipe?

<p>If parameter.ProductSearchParameter.ProductNames is null or empty. (C), If parameter.ProductSearchParameter.ProductErpNumbers is null or empty. (D)</p> Signup and view all the answers

What does the result.ProductIdFilter contain after combining FieldQueries?

<p>It holds the IDs of products filtered based on ID criteria. (D)</p> Signup and view all the answers

What happens if result.AllFilters is empty?

<p>result.CombinedFilter will be assigned null. (D)</p> Signup and view all the answers

How are filters from parameter.ProductSearchParameter.ProductErpNumbers processed?

<p>They are combined into a BooleanQuery using Operation.Or. (C)</p> Signup and view all the answers

What role does the IPerRequestCacheManager play in the filtering process?

<p>It retrieves the restriction group filter based on context IDs. (B)</p> Signup and view all the answers

Which operation is used to combine all filters in result.AllFilters into one?

<p>Operation.And (B)</p> Signup and view all the answers

What is the result of executing a FieldQuery against the ISearchProductObject.Name field?

<p>It restricts results to those that match given product names. (D)</p> Signup and view all the answers

What should be done if 'ProductLinesEnabled' is true and there are brands with non-empty 'ProductLineName'?

<p>Order brands using OrderByDescending by 'Score'. (D)</p> Signup and view all the answers

What happens if 'parameter.Criteria' is null?

<p>The processing continues without filtering results. (A)</p> Signup and view all the answers

What is the purpose of creating the variable 'queryWords'?

<p>To split 'parameter.Criteria' by spaces for further processing. (C)</p> Signup and view all the answers

What should be done to brands that do not match any 'queryWords'?

<p>Null the 'ProductLineName', 'ProductLineId', and 'ProductLineUrlSegment' fields. (B)</p> Signup and view all the answers

What is the outcome of grouping 'result.BrandSearchResult.Brands' by 'Id' and 'ProductLineId'?

<p>It selects the first group and limits to 'parameter.MaximumNumber'. (D)</p> Signup and view all the answers

What is the function of the ProductSearchPipeline's FormProductFilter pipeline?

<p>To assign the product filter results to the result object. (D)</p> Signup and view all the answers

What condition leads to skipping to the next processing pipe without taking action?

<p>If 'parameter.ProductFacetSearchParameter.BrandStartsWith' is blank. (C)</p> Signup and view all the answers

What does the initialization process with Dependency Injection attach to the result object?

<p>Multiple processors and settings related to product searching. (B)</p> Signup and view all the answers

Flashcards

CategoryIndexerPipeline

A pipeline responsible for creating and indexing Elasticsearch categories.

CreateElasticsearchCategory

Creates an ElasticsearchCategory object from input data.

GetIndexableCategoriesQuery

Forms an Entity Framework query for indexable categories from input data.

MapElasticSearchCategoryCustomProperties

Handles custom properties for Elasticsearch Categories.

Signup and view all the flashcards

CategorySearchPipeline

A pipeline that executes a category search query.

Signup and view all the flashcards

InitializeSearchProperties

Retrieves crucial search parameters, like site context, indexes, and builders.

Signup and view all the flashcards

FormCategoryExcludeFilter

Filters out categories based on a disallowed list.

Signup and view all the flashcards

FormLanguageFilter

Filters search results based on the language.

Signup and view all the flashcards

FormWebsiteFilter

Filters search results based on the website.

Signup and view all the flashcards

FormTypeFilter

Adds a query filter for 'type' equal to 'category'.

Signup and view all the flashcards

CombineFilters

Combines multiple filters into a single filter.

Signup and view all the flashcards

FormMainSearchQuery

Creates a main search query using 'MultiMatchQuery'.

Signup and view all the flashcards

FormFuzzySearchQuery

Creates search query using MultiMatchFuzzyQuery for fuzzy matches.

Signup and view all the flashcards

CombineQueries

Combines individual search queries using 'Or'.

Signup and view all the flashcards

ApplyQueryAndFilter

Applies a FunctionScoreQuery for boosting search results.

Signup and view all the flashcards

GetRestrictionGroupFilter

Retrieves a restriction group filter from the cache.

Signup and view all the flashcards

ProcessProductLines

Processes product lines based on search criteria.

Signup and view all the flashcards

FormProductIdFilter

Filters results by product IDs.

Signup and view all the flashcards

FormProductNameFilter

Filters based on product names.

Signup and view all the flashcards

FormProductErpNumberFilter

Filters product results by ERP numbers.

Signup and view all the flashcards

RunProductFacetSearch

Executes a product facet search.

Signup and view all the flashcards

FormBrandStartsWithFilter

Filters brands by a starting string.

Signup and view all the flashcards

FormProductFilter

Filters products, retrieves results from a previous pipeline.

Signup and view all the flashcards

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 the parameter.SearchBoost.IsQueryable and parameter.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 the FormCategoryExcludeList 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. If result.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 to result.CombinedFilter. If no filters are found, result.CombinedFilter will be set to null.
  • 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 to result.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 contain PerformSearch.ContentAggregationKey, continues to the next pipe. Selects from PerformSearch.ContentAggregationKey Items, any PerformSearch.TopHitsAggregationKey using the parameter.SearchContentMapper.ToContentSearchResultDto to create new ContentSearchResultDto, and assigns the resulting collection to result.ContentSearchResults.
  • ProcessSearchResponseForAllAggregations: If the result.SearchResponse.Aggregations does not contain PerformSearch.ContentAggregationKey, continues to the next pipe. Selects from result.SearchResponse.Aggregations all PerformSearch.TopHitsAggregationKey using the parameter.SearchContentMapper.ToContentSearchResultDto to create new ContentSearchResultDto, and assigns the resulting collection to result.ContentSearchResults.
  • ProcessSearchResponseFromResult: If result.ContentSearchResults is empty, continues to the next pipe. Selects from result.SearchResponse.Hits all not null using the parameter.SearchContentMapper.ToContentSearchResultDto to create new ContentSearchResultDto, and assigns the resulting collection to result.ContentSearchResults.

FormProductIdFilter

  • Makes a FieldQuery for each product in parameter.ProductSearchParameter.ProductIds against the ISearchProductObject.ProductId field, combines them into a BooleanQuery using the Operation.Or, assigns it to result.ProductIdFilter, and adds result.ProductIdFilter to result.AllFilters.
  • If parameter.ProductSearchParameter.ProductNames is null or empty, continues to the next pipe.

FormProductNameFilter

  • Makes a FieldQuery for each product in parameter.ProductSearchParameter.ProductNames against the ISearchProductObject.Name field, combines them into a BooleanQuery using the Operation.Or, assigns it to result.ProductNameFilter, and adds result.ProductNameFilter to result.AllFilters.
  • If parameter.ProductSearchParameter.ProductErpNumbers is null or empty, continues to the next pipe.

FormProductErpNumberFilter

  • Makes a FieldQuery for each product in parameter.ProductSearchParameter.ProductErpNumbers against the ISearchProductObject.ErpNumberSort field, combines them into a BooleanQuery using the Operation.Or, assigns it to result.ProductErpNumberFilter, and adds result.ProductErpNumberFilter to result.AllFilters.

CombineFilters

  • Makes a BoolQuery with the Operation.And of all filters in result.AllFilters and assigns it to result.CombinedFilter or null if filters are empty.

GetRestrictionGroupFilter

  • Attempts to retrieve the Restriction Group filter from the IPerRequestCacheManager cache based on parameter.SiteContext.BillTo.Id and parameter.SiteContext.ShipTo.Id, and assigns it to result.RestrictionGroupFilter.
  • If parameter.ProductLinesEnabled is true and has result.BrandSearchResult.Brands that do not have a blank 'ProductLineName', orders result.BrandSearchResult.Brands using OrderByDescending by 'Score'.
  • If the prior checks pass, fall back to sorting by Score for the parameter.MaximumNumber. Then set brand results to result.BrandSearchResult.Brands.
  • If parameter.Criteria is null, result.BrandSearchResult?.Brands is null, or result.BrandSearchResult.Brands all ProductLineNames are empty, continue on to the next pipe.

ProcessProductLines

  • Creates a queryWords variable by splitting parameter.Criteria by ' ' (Space).
  • Nulls the ProductLineId, ProductLineName and ProductLineUrlSegement fields on result.BrandSearchResult.Brands for the brand results that don't match any queryWords 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 taking parameter.MaximumNumber, then assigns it to result.BrandSearchResult.Brands. This removes duplicates.

RunProductFacetSearch

  • InitializeSearchProperties: Uses Dependency Injection to attach ProductSearchFacetProcessor, and SearchGeneralSettings, then assign them to the result object. Sets the IndexType, SearchClient, and SearchQueryBuilder from the parameter to the result.
  • FormProductFilter: This pipe uses the FormProductFilter pipeline to get the product filter and assign it to result.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.

Quiz Team

Related Documents

Search - search pipelines.pdf

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.

More Like This

Use Quizgecko on...
Browser
Browser