QueryType = Simple
SearchMode = All
var myField = new Field("field", DataType.String)
{
IsRetrievable = false,
IsSearchable = true,
Analyzer = "myAnalyzer"
};
fields.Add(myField);
var index = new Index()
{
Name = IndexName,
Fields = fields,
Tokenizers = new List<Tokenizer>()
{
new PatternTokenizer()
{
Name = "myPatternTokenizer",
Pattern = "[\\s]"
}
},
Analyzers = new List<Analyzer>()
{
new CustomAnalyzer()
{
Name = "myAnalyzer",
Tokenizer = "myPatternTokenizer"
}
}
};
为什么通配符搜索不再与CustomAnalyzer + PatternTokenizer(Pattern =&#34; \ s&#34;)结合使用?没有CustomAnalyzer它工作正常!
没有CustomAnalyzer:
价值:&#34; Azure&#34;
搜索&#34; Az *&#34;
匹配:是真的
使用CustomAnalyzer + PatternTokenizer:
价值:&#34; Azure&#34;
搜索&#34; Az *&#34;
匹配:false //为什么???