Skip to Main Content
Customer Feedback

We love feedback from you on our products and the problems in your daily work that you would like us to solve. Please describe the challenge you're encountering and your desired outcome. Be as detailed as possible.

For technical issues or bugs please head to Support or our Developer Community. You can assign up to 10 votes in total. Thank you for your feedback.

Status explanation: 'Future Consideration' = Continuing to collect further feedback, not planned at this time. 'Investigating' = Prioritized for deeper customer and feasibility investigations ahead of planning development.

Status Already exists
Categories Catalog & Assets
Created by Guest
Created on Feb 7, 2022

Search fields only available on productnumber (ngram, autocomplete)

Often we need to utilize an ERP unique identifier as the partNumber in Opti, but that's not necessarily the one used by end customers for searching for products. The search features built into the platform, such as ngram and autocomplete, are against part number, but clients often want it against other fields, such as SKU. Therefore, this request is to add an option to select the field that feature searches against. This has been discussed with Sara already with regards to one our clients.

  • Optimizely
    Sara Winter
    Reply
    |
    Mar 1, 2023

    Partners should be able to replace this pipe in RunProductSearch pipeline:

    namespace Insite.Search.Elasticsearch.DocumentTypes.Product.Query.Pipelines.Pipes.RunProductSearch
    {
    using System;
    using System.Linq;
    using Insite.Core.Interfaces.Data;
    using Insite.Core.Plugins.Pipelines;
    using Insite.Core.Plugins.Search.Dtos;
    using Insite.Search.Elasticsearch.DocumentTypes.Product.Query.Pipelines.Parameters;
    using Insite.Search.Elasticsearch.DocumentTypes.Product.Query.Pipelines.Results;
    using Nest;

    public sealed class ProcessAutoCorrectSuggestion
    : IPipe<RunProductSearchParameter, RunProductSearchResult>
    {
    public int Order => 3000;

    public RunProductSearchResult Execute(
    IUnitOfWork unitOfWork,
    RunProductSearchParameter parameter,
    RunProductSearchResult result
    )
    {
    Suggest<ElasticsearchProduct>[] autoCorrectSuggestions;
    if (
    result.SearchResponse.Suggest == null
    || !result.SearchResponse.Suggest.TryGetValue(
    FormAutoCorrectSuggestion.PhraseSuggestAutoCorrectionKey,
    out autoCorrectSuggestions
    )
    || autoCorrectSuggestions.Length != 1
    || this.SearchCriteriaMatchesProductErpNumberInSearchResponse(
    parameter.ProductSearchParameter.SearchCriteria,
    result
    )
    )
    {
    return result;
    }

    result.ProductSearchResult.AutoCorrectSuggestion = autoCorrectSuggestions[0].Options
    .Select(
    o =>
    new SuggestionDto
    {
    Suggestion = o.Text,
    HighlightedSuggestion = o.Text,
    Score = o.Score
    }
    )
    .FirstOrDefault();

    return result;
    }

    private bool SearchCriteriaMatchesProductErpNumberInSearchResponse(
    string searchCriteria,
    RunProductSearchResult result
    )
    {
    return result.SearchSuggestionsSettings.ExcludePartNumberFromAutoCorrect
    && result.SearchResponse.Documents != null
    && result.SearchResponse.Documents.Any(
    o => o.ErpNumber.EqualsIgnoreCase(searchCriteria)
    );
    }
    }
    }
  • Optimizely
    Sara Winter
    Reply
    |
    Jan 20, 2023

    Thank you for submitting this request! Our team is currently reviewing if and how we may implement this feature, particularly with consideration of our wide client base. We will update this ticket once we have completed the investigation.