我在搜索时发现了一些模糊的行为。关键字在单词的中间搜索。例如:
索引项目
"sample one"
"jones"
并在搜索
时"sample one"
它返回两个不需要的记录。
solr.EdgeNGramFilterFactory在这里受到关注吗?或任何其他
FIELD TYPE
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="4" maxGramSize="25" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
VERBOSE OUTPUT
WT
text
raw_bytes
start
end
position
type
Sample
[53 61 6d 70 6c 65]
0
6
1
word
Video
[56 69 64 65 6f]
7
12
2
word
One
[4f 6e 65]
13
16
3
word
ENGTF
text
raw_bytes
start
end
position
type
Samp
[53 61 6d 70]
0
4
1
word
Sampl
[53 61 6d 70 6c]
0
5
2
word
Sample
[53 61 6d 70 6c 65]
0
6
3
word
Vide
[56 69 64 65]
7
11
4
word
Video
[56 69 64 65 6f]
7
12
5
word
LCF
text
raw_bytes
position
start
end
type
samp
[73 61 6d 70]
1
0
4
word
sampl
[73 61 6d 70 6c]
2
0
5
word
sample
[73 61 6d 70 6c 65]
3
0
6
word
vide
[76 69 64 65]
4
7
11
word
video
[76 69 64 65 6f]
5
7
12
word
WT
text
raw_bytes
start
end
position
type
Sample
[53 61 6d 70 6c 65]
0
6
1
word
Video
[56 69 64 65 6f]
7
12
2
word
One
[4f 6e 65]
13
16
3
word
ENGTF
text
raw_bytes
start
end
position
type
Samp
[53 61 6d 70]
0
4
1
word
Sampl
[53 61 6d 70 6c]
0
5
2
word
Sample
[53 61 6d 70 6c 65]
0
6
3
word
Vide
[56 69 64 65]
7
11
4
word
Video
[56 69 64 65 6f]
7
12
5
word
LCF
text
raw_bytes
position
start
end
type
samp
[73 61 6d 70]
1
0
4
word
sampl
[73 61 6d 70 6c]
2
0
5
word
sample
[73 61 6d 70 6c 65]
3
0
6
word
vide
[76 69 64 65]
4
7
11
word
video
[76 69 64 65 6f]
5
7
12
word