search for and boost a specific stop word in examine
Maybe you can still create and extend you own analyser?
Repeating the code here incase our disappears.
using System.Collections;
using System.Linq;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard;
namespace My.Namespace
{
public class MyStandardAnalyser : StandardAnalyzer
{
public MyStandardAnalyser() : base(Lucene.Net.Util.Version.LUCENE_29, MyStandardAnalyser.ENGLISH_STOP_WORDS_SET)
{
}
private static Hashtable ENGLISH_STOP_WORDS_SET {
get
{
var stopWords = Lucene.Net.Analysis.Standard.StandardAnalyzer.STOP_WORDS;
var set = stopWords.Where(w => w.ToLower() != "will").ToArray();
var charSet = new CharArraySet(set, true);
return CharArraySet.UnmodifiableSet(charSet);
}
}
}
}
Then amended the ExamineSettings.config file so that the ExternalIndexer & ExternalSearcher uses the new Analyzer.
and presumably will require a full reindex
Custom indexing | Umbraco CMS
public void Configure(string? name, LuceneDirectoryIndexOptions options)
{
switch (name)
{
//NB you need to rebuild the examine index for these changes to take effect
case Constants.UmbracoIndexes.ExternalIndexName:
options.Analyzer = new MyStandardAnalyser();