forked from e621ng/e621ng
[UserFeedback] Fix body search timing out
This somehow worked without the index previously.
This commit is contained in:
parent
d4389b756d
commit
0faf1fa1a3
5
db/migrate/20230314170352_user_feedback_body.rb
Normal file
5
db/migrate/20230314170352_user_feedback_body.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class UserFeedbackBody < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_index :user_feedback, "to_tsvector('english', body)", using: :gin
|
||||
end
|
||||
end
|
@ -4193,6 +4193,13 @@ CREATE INDEX index_user_feedback_on_creator_id ON public.user_feedback USING btr
|
||||
CREATE INDEX index_user_feedback_on_creator_ip_addr ON public.user_feedback USING btree (creator_ip_addr);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_user_feedback_on_to_tsvector_english_body; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_user_feedback_on_to_tsvector_english_body ON public.user_feedback USING gin (to_tsvector('english'::regconfig, body));
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_user_feedback_on_user_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4619,6 +4626,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||
('20230221145226'),
|
||||
('20230221153458'),
|
||||
('20230226152600'),
|
||||
('20230312103728');
|
||||
('20230312103728'),
|
||||
('20230314170352');
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user