如何修改搜索以便能够点击我的 searchString?
我有以下值的变量:
fieldName: nodeName
searchString: des
我希望能够通过其中的任何连续字符找到 nodeName:例如Esa selects Ariane 6 basic design
通过输入design
.
我当前的搜索构造为:
var searchCriteria = SearchProvider.CreateSearchCriteria(BooleanOperation.Or);
var luceneString = string.Format("{0}:", fieldName);
luceneString += "(+" + searchString.Replace(" ", " +") + ")^10 ";
luceneString += string.Format("{0}:{1}", fieldName, searchString);
var rawQuery = searchCriteria.RawQuery(luceneString).Field(fieldName, searchString.Fuzzy(0.8f));
我的考试定义:
<add name="AutoCompleteLookupIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
supportUnpublished="true"
supportProtected="true"
analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" />