Added Searching Features
* Added Thread Search Feature * Added User Search Feature * Re-organized searching, added @mention support to author search
This commit is contained in:
8
db/migrate/20170522210610_add_search_indexes.rb
Normal file
8
db/migrate/20170522210610_add_search_indexes.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class AddSearchIndexes < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :forumthreads, [:title, :content], type: :fulltext
|
||||
add_index :forumthreads, :title, type: :fulltext
|
||||
add_index :forumthreads, :content, type: :fulltext
|
||||
add_index :threadreplies, :content, type: :fulltext
|
||||
end
|
||||
end
|
||||
12
db/schema.rb
12
db/schema.rb
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170515200733) do
|
||||
ActiveRecord::Schema.define(version: 20170522210610) do
|
||||
|
||||
create_table "blogposts", force: :cascade do |t|
|
||||
t.string "title", limit: 191
|
||||
@@ -65,6 +65,10 @@ ActiveRecord::Schema.define(version: 20170515200733) do
|
||||
t.integer "label_id", limit: 4
|
||||
end
|
||||
|
||||
add_index "forumthreads", ["content"], name: "index_forumthreads_on_content", type: :fulltext
|
||||
add_index "forumthreads", ["title", "content"], name: "index_forumthreads_on_title_and_content", type: :fulltext
|
||||
add_index "forumthreads", ["title"], name: "index_forumthreads_on_title", type: :fulltext
|
||||
|
||||
create_table "info", force: :cascade do |t|
|
||||
t.string "title", limit: 191
|
||||
t.text "content", limit: 65535
|
||||
@@ -78,8 +82,8 @@ ActiveRecord::Schema.define(version: 20170515200733) do
|
||||
end
|
||||
|
||||
create_table "register_tokens", force: :cascade do |t|
|
||||
t.string "uuid", limit: 191, null: false
|
||||
t.string "token", limit: 191, null: false
|
||||
t.string "uuid", limit: 32, null: false
|
||||
t.string "token", limit: 6, null: false
|
||||
t.string "email", limit: 191, null: false
|
||||
end
|
||||
|
||||
@@ -116,6 +120,8 @@ ActiveRecord::Schema.define(version: 20170515200733) do
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "threadreplies", ["content"], name: "index_threadreplies_on_content", type: :fulltext
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
t.string "uuid", limit: 191, null: false
|
||||
t.string "name", limit: 191, null: false
|
||||
|
||||
Reference in New Issue
Block a user