Revert "FEATURE: hidden site setting to disable search prefix matching (#20058)" (#20073)

This reverts commit 64f7b97d08.

Too many side effects for this setting, we have decided to remove it
This commit is contained in:
Sam
2023-01-31 07:39:23 +08:00
committed by GitHub
parent 4d12bdfdcb
commit 5d669d8aa2
3 changed files with 1 additions and 26 deletions
-21
View File
@@ -2580,25 +2580,4 @@ RSpec.describe Search do
expect(result.categories.length).to eq(0)
end
end
context "when enable_search_prefix_matching is disabled" do
before do
SearchIndexer.enable
SiteSetting.enable_search_prefix_matching = false
end
fab!(:post) do
Fabricate(:post, topic: topic, raw: "this body of the post contains abracadabra")
end
it "omits prefix search results" do
SearchIndexer.index(post, force: true)
result = Search.execute("abra")
expect(result.posts.length).to eq(0)
result = Search.execute("abracadabra")
expect(result.posts.length).to eq(1)
end
end
end