Fix bug on elastic search (#12811)
* Fix bug on elastic search * Add more comments for elastic search result startIndex and endIndex * refactor indexPos * refactor indexPos * Fix bug
This commit is contained in:
@ -34,3 +34,9 @@ func TestESIndexAndSearch(t *testing.T) {
|
||||
|
||||
testIndexer("elastic_search", t, indexer)
|
||||
}
|
||||
|
||||
func TestIndexPos(t *testing.T) {
|
||||
startIdx, endIdx := indexPos("test index start and end", "start", "end")
|
||||
assert.EqualValues(t, 11, startIdx)
|
||||
assert.EqualValues(t, 24, endIdx)
|
||||
}
|
||||
|
Reference in New Issue
Block a user