card-mod-fulltext 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93a52bd07ccc0265fd84b336b56756dd8a4ef2aa2b8e5152b4f44e4f453b2492
4
- data.tar.gz: def54ecc50932efc833d39b2f6657c5c67ba3f18d28ee9039b17fb26a21f207c
3
+ metadata.gz: df7b84d82ef4a9df97113dbf760581c05c105c6e1ad7f848555cd7a29e90ca4f
4
+ data.tar.gz: 5915da0e2a24bee3a77b6084078556c077d8ac68d1b0e2537a61b20ea07b1a1b
5
5
  SHA512:
6
- metadata.gz: 005e152195747735d7dcda0622790d165bcc6564cbc1174efcce62651721005de2cf42669df721c2b8bc38ee7deb78ea0d3dc12a6e357e3c8c28427abba8ef95
7
- data.tar.gz: fa89c31f7e9581f5441328c52552685f6153e29308a279953a477ab712f85faf6a12aee121eb12f2e692fdd2ae2814b89d9c319a1542854da90c362957b1dc03
6
+ metadata.gz: aa8cd3eaf3d55ca2129d9bc1d9c7b4a466f5d6f4fea5c65cc8234f4fc4284f141f8828dae8a731c44624ed6da620f92e2aa67263cafb71f0a997fead20c2c618
7
+ data.tar.gz: 185066e563846bf80e739ba1634c6e9a7c8925b0f9b8dcf3af69a99a0c236108d990e112242cb9316d4fd88bf9c9dff8b775591b7d64b6c2fd1b34fd6fa77d0a
@@ -0,0 +1,9 @@
1
+
2
+ class PopulateSearchContent < Cardio::Migration
3
+ def up
4
+ Card.find_each do |card|
5
+ card.include_set_modules
6
+ card.update_column :search_content, card.content_for_search
7
+ end
8
+ end
9
+ end
@@ -28,7 +28,7 @@ class Card
28
28
  # the default ordering is by relevance, so we just need to
29
29
  # make sure there is no explicit order by clause
30
30
  def order
31
- super unless order_config == "relevance"
31
+ super unless @mods[:sort] == "relevance"
32
32
  end
33
33
 
34
34
  # Note: the more explicit route (which will be necessary if we want to support
@@ -10,6 +10,6 @@ end
10
10
 
11
11
  def search_content_field_names
12
12
  search_content_field_codes.map do |code|
13
- name.trait_name code
13
+ name.field_name code
14
14
  end
15
15
  end
@@ -2,10 +2,8 @@ event :set_search_content, after: :set_content do
2
2
  self.search_content = tagless { content_for_search.to_s }
3
3
  end
4
4
 
5
- event :trigger_left_search_content_update, after: :set_search_content do
6
- return unless name.compound?
5
+ event :trigger_left_search_content_update, after: :set_search_content, when: :compound? do
7
6
  l = left
8
-
9
7
  return unless l&.real? && l.search_content_field_names&.include?(name)
10
8
 
11
9
  l.set_search_content
@@ -25,9 +23,7 @@ def content_for_search
25
23
  end
26
24
 
27
25
  def search_content_cards
28
- return [] unless structure && nest_chunks
29
-
30
- nest_chunks.map(&:referee_card).compact
26
+ structure && nest_chunks ? nest_chunks.map(&:referee_card).compact : []
31
27
  end
32
28
 
33
29
  def search_content_field_names
@@ -0,0 +1 @@
1
+ include_set Abstract::NoSearchContent
@@ -0,0 +1 @@
1
+ include_set Abstract::NoSearchContent
data/set/type/css.rb ADDED
@@ -0,0 +1 @@
1
+ include_set Abstract::NoSearchContent
@@ -0,0 +1 @@
1
+ include_set Abstract::NoSearchContent
@@ -0,0 +1 @@
1
+ include_set Abstract::NoSearchContent
data/set/type/scss.rb ADDED
@@ -0,0 +1 @@
1
+ include_set Abstract::NoSearchContent
data/set/type/skin.rb ADDED
@@ -0,0 +1 @@
1
+ include_set Abstract::NoSearchContent
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-fulltext
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipp Kühl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-10-26 00:00:00.000000000 Z
12
+ date: 2021-12-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: card
@@ -34,11 +34,19 @@ extra_rdoc_files: []
34
34
  files:
35
35
  - README.md
36
36
  - db/migrate/20200302171011_add_fulltext_indexing.rb
37
+ - db/migrate_cards/20200613014844_populate_search_content.rb
37
38
  - lib/card/query/card_query/full_text_matching.rb
38
39
  - set/abstract/filter.rb
39
40
  - set/abstract/no_search_content.rb
40
41
  - set/abstract/search_content_fields.rb
41
42
  - set/all/search_content.rb
43
+ - set/type/bootswatch_skin.rb
44
+ - set/type/coffee_script.rb
45
+ - set/type/css.rb
46
+ - set/type/customized_bootswatch_skin.rb
47
+ - set/type/java_script.rb
48
+ - set/type/scss.rb
49
+ - set/type/skin.rb
42
50
  homepage: http://decko.org
43
51
  licenses:
44
52
  - GPL-3.0
@@ -59,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
67
  - !ruby/object:Gem::Version
60
68
  version: '0'
61
69
  requirements: []
62
- rubygems_version: 3.2.28
70
+ rubygems_version: 3.2.15
63
71
  signing_key:
64
72
  specification_version: 4
65
73
  summary: MySQL fulltext searches for decko