Skip to content
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

Determine fuzziness of bleve indexer by keyword length #29706

Merged
merged 18 commits into from
Mar 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
  • Loading branch information
6543 committed Mar 23, 2024
commit f32bb1cad91e30e50ae47f729cc4e15e4826542c
5 changes: 1 addition & 4 deletions tests/integration/repo_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package integration
import (
"net/http"
"testing"
"time"

"code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
Expand Down Expand Up @@ -34,7 +33,6 @@ func TestSearchRepo(t *testing.T) {
assert.NoError(t, err)

code_indexer.UpdateRepoIndexer(repo)
6543 marked this conversation as resolved.
Show resolved Hide resolved
time.Sleep(100 * time.Millisecond)

testSearch(t, "/user2/repo1/search?q=Description&page=1", []string{"README.md"})

Expand All @@ -45,12 +43,11 @@ func TestSearchRepo(t *testing.T) {
assert.NoError(t, err)

code_indexer.UpdateRepoIndexer(repo)
6543 marked this conversation as resolved.
Show resolved Hide resolved
time.Sleep(100 * time.Millisecond)

testSearch(t, "/user2/glob/search?q=loren&page=1", []string{"a.txt"})
testSearch(t, "/user2/glob/search?q=loren&page=1&t=match", []string{"a.txt"})
testSearch(t, "/user2/glob/search?q=file3&page=1", []string{"x/b.txt", "a.txt"})
testSearch(t, "/user2/glob/search?q=file3&page=1&t=match", []string{"x/b.txt"})
testSearch(t, "/user2/glob/search?q=file3&page=1&t=match", []string{"x/b.txt", "a.txt"})
testSearch(t, "/user2/glob/search?q=file4&page=1&t=match", []string{})
6543 marked this conversation as resolved.
Show resolved Hide resolved
testSearch(t, "/user2/glob/search?q=file5&page=1&t=match", []string{})
6543 marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down