aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2018-01-20 15:31:48 -0500
committerAlec Warner <antarus@gentoo.org>2018-01-20 15:31:48 -0500
commitc2312d196a2bd2d8f0378a97f22cf727e3547ed6 (patch)
treeae20aca9801642f305657ef19a627deeaafb87eb /app
parentBoost factor is replaced by weight. (diff)
downloadpackages-c2312d196a2bd2d8f0378a97f22cf727e3547ed6.tar.gz
packages-c2312d196a2bd2d8f0378a97f22cf727e3547ed6.tar.bz2
packages-c2312d196a2bd2d8f0378a97f22cf727e3547ed6.zip
Turn category names back into keywords.
The 'text' fields were not indexed properly. Keyword fields are indexed properly, so turn it back into a keyword. Also fix the index reloading to remove indices by name.
Diffstat (limited to 'app')
-rw-r--r--app/models/category.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/category.rb b/app/models/category.rb
index d00c88f..f629bde 100644
--- a/app/models/category.rb
+++ b/app/models/category.rb
@@ -4,7 +4,7 @@ class Category
index_name "categories-#{Rails.env}"
- attribute :name, String, mapping: { type: 'text' }
+ attribute :name, String, mapping: { type: 'keyword' }
attribute :description, String, mapping: { type: 'text' }
attribute :metadata_hash, String, mapping: { type: 'text' }