Litium version: 6.0
Hi,
We have categories and products with names containing special characters in it, few example names are
Polyamide Light Roller with Flange PSAS —.6201(we have a autocomplete search functionality and for this name whenever i type a space after
word Polyamide
search not returned any results back)
Polyamide Light Roller… PAS0360 2(same with this name as well)
U-Profile UP—.0700
C-Skena
I am using the following code to define tags
public static void ApplyNameAndMonitorArtcileNumberSearchTagsExactMatch(this SearchQuery searchQuery, QueryRequest request)
{
var text = searchQuery.Text;
if (string.IsNullOrEmpty(text))
{
return;
}
var cultureInfo = new Guid(request.LanguageId).GetLanguage()?.CultureInfo;
var textClause = new OptionalTagClause();
textClause.Tags.Add(new Tag("_name".GetFieldDefinitionForProducts()?.GetTagName(cultureInfo), $"{searchQuery.Text}*"));
textClause.Tags.Add(new Tag("_name".GetFieldDefinitionForProducts()?.GetTagName(cultureInfo), $"*{searchQuery.Text}"));
textClause.Tags.Add(new Tag("_name".GetFieldDefinitionForProducts()?.GetTagName(cultureInfo), $"*{searchQuery.Text}*"));
textClause.Tags.Add(new Tag("_name".GetFieldDefinitionForProducts()?.GetTagName(cultureInfo), searchQuery.Text) { AllowFuzzy = false, Analyzer = "whitespace" });
request.FilterTags.Add(textClause);
}
But search service not returning any results back for the names containing special characters. I also tried with
keyword analyzer, still not received any results back(i have applied the keyword analyser the same way we use whitespace, like
Analyser property set to “keyword”
).
What should i do to get results back from search service for names containing special characters in it?
I also noted from product PIM litium Backoffice, i am getting the result back for these product names