質問編集履歴

4

p

2023/01/26 04:23

投稿

pecchan
pecchan

スコア555

test CHANGED
File without changes
test CHANGED
@@ -181,7 +181,7 @@
181
181
  ```ここに言語を入力
182
182
  curl http://localhost:9200/_cluster/health?pretty
183
183
  {
184
- "cluster_name" : "elasticsearch_tanaka",
184
+ "cluster_name" : "elasticsearch_pero",
185
185
  "status" : "yellow",
186
186
  "timed_out" : false,
187
187
  "number_of_nodes" : 1,

3

elastic側を一つずつ確認中

2023/01/26 04:23

投稿

pecchan
pecchan

スコア555

test CHANGED
File without changes
test CHANGED
@@ -172,3 +172,30 @@
172
172
  updated_at: Thu, 26 Jan 2023 02:11:09.350065000 UTC +00:00>]
173
173
  irb(main):019:0>
174
174
  ```
175
+
176
+
177
+ 追記
178
+ elastic側を一つずつ確認中
179
+ 今回のことに関係あるか分かりませんがステータスがyellowでした
180
+
181
+ ```ここに言語を入力
182
+ curl http://localhost:9200/_cluster/health?pretty
183
+ {
184
+ "cluster_name" : "elasticsearch_tanaka",
185
+ "status" : "yellow",
186
+ "timed_out" : false,
187
+ "number_of_nodes" : 1,
188
+ "number_of_data_nodes" : 1,
189
+ "active_primary_shards" : 4,
190
+ "active_shards" : 4,
191
+ "relocating_shards" : 0,
192
+ "initializing_shards" : 0,
193
+ "unassigned_shards" : 1,
194
+ "delayed_unassigned_shards" : 0,
195
+ "number_of_pending_tasks" : 0,
196
+ "number_of_in_flight_fetch" : 0,
197
+ "task_max_waiting_in_queue_millis" : 0,
198
+ "active_shards_percent_as_number" : 80.0
199
+ }
200
+
201
+ ```

2

d

2023/01/26 02:51

投稿

pecchan
pecchan

スコア555

test CHANGED
File without changes
test CHANGED
@@ -121,7 +121,7 @@
121
121
  % curl http://localhost:9200
122
122
  {
123
123
  "name" : "peronoMac-mini.local",
124
- "cluster_name" : "elasticsearch_tanaka",
124
+ "cluster_name" : "elasticsearch_pero",
125
125
  "cluster_uuid" : "NiCENitKx3dWw",
126
126
  "version" : {
127
127
  "number" : "7.17.4",

1

2023/01/26 02:49

投稿

pecchan
pecchan

スコア555

test CHANGED
File without changes
test CHANGED
@@ -4,12 +4,14 @@
4
4
  railsからElasticsearchを利用したく、Elasticsearch本体とgemをインストールしました。
5
5
 
6
6
  ### 実現したいこと
7
- rails コンソールから入れたデータをElasticsearchから検索、取得したい。
7
+ rails コンソールからアプリ側に入れたデータをElasticsearchから検索、取得したい。
8
8
 
9
9
  ### 発生している問題・エラーメッセージ
10
10
  Elasticsearchで検索を行うためモデル.import()しましたが0件となりました。
11
11
 
12
12
  どうすればElasticsearchにデータが入れられるのでしょうか?
13
+
14
+ 何か確認すべき所などあれば教えて下さい。
13
15
 
14
16
  ```
15
17
  irb(main):017:0> Article.import
@@ -17,7 +19,7 @@
17
19
  => 0
18
20
  ```
19
21
 
20
- ですがこの通りデータは入てます。
22
+ ですがこの通りデータはアプリ側にてます。
21
23
  ```ここに言語を入力
22
24
  irb(main):018:0> Article.all
23
25
  Article Load (0.2ms) SELECT "articles".* FROM "articles"