New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug on elastic search #12811
Fix bug on elastic search #12811
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12811 +/- ##
==========================================
+ Coverage 43.12% 43.14% +0.01%
==========================================
Files 654 654
Lines 72194 72205 +11
==========================================
+ Hits 31133 31152 +19
+ Misses 36010 36008 -2
+ Partials 5051 5045 -6
Continue to review full report at Codecov.
|
8cf40ee
to
c5462d1
Compare
@zeripath done. |
c5462d1
to
32de75f
Compare
e9ffc8d
to
a58e9ae
Compare
@zeripath done. |
So need to figure out what happens with content |
@zeripath Updated on the first comment of mine. |
When input two words or some Unicode texts on the search box, the default elastic search highlighting plugin will return content with high light html tags. i.e.
<em>word1</em> <em>word2</em>
.But the previous codes will try to find
<em>word1 word2</em>
and returnstartIndex = endIndex = -1
which will resutl in a panic.Should fix #12791
Since the new mapping option
"term_vector": "with_positions_offsets"
added, you have to delete your index previously.You can try
And restart gitea, the index will be rebuilt.
The new option will increse the space of the index but get faster on returning words positions.