Lucene search improvement Q&A

Hi
when I search for a product eg: “Iphone 12”
I get results which are not coming under iphone 12.
I have lot of products with title
eg: “some title iphone 12 / 12 pro”

I am able to search for “iphone 12 pro” and which gives a good result.
it looks like its searching for the first or last terms.
is there any way to fix this ??

clause.Tags.Add(new Tag(name, term) { AllowFuzzy = true, Boost = boost });
clause.Tags.Add(new Tag(name, $"{ term }*") { Boost = boost });
clause.Tags.Add(new Tag(name, $"*{ term }") { Boost = boost });
clause.Tags.Add(new Tag(name, term) { Boost = boost });

Litium version: [7.5]

1 Like

I could fix this issue by adding a new clause

clause.Tags.Add(new Tag(name, $“*{ term }*”) { Boost = boost });

$“*{ term }*” this is the change.

I am worried that, will this have any performance impact ?
I would like to hear from others.
Please let me know what are your thoughts.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.