# NameError: uninitialized constant Swiftype::Loops

**URL:** <https://discuss.elastic.co/t/nameerror-uninitialized-constant-swiftype-loops/198253>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [September 5, 2019, 1:02pm UTC](https://discuss.elastic.co/t/nameerror-uninitialized-constant-swiftype-loops/198253 "2019-09-05T13:02:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kikil592](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kikil592/32/40781_2.png) [@kikil592](https://discuss.elastic.co/u/kikil592)\
**Post date:** [September 5, 2019, 1:02pm UTC](https://discuss.elastic.co/t/nameerror-uninitialized-constant-swiftype-loops/198253/1 "2019-09-05T13:02:14Z")

</div>

Hi there,

I'm trying to index some documents with Elastic App Search. It is well connected with Elasticsearch but get the error:

worker.1 | [2019-09-05T12:48:48.076+00:00][12003][2318][active\_job][INFO]: [ActiveJob] [Work::Engine::IndexAdder] [4a7070b0d56d1860a4ebec1c2551ce74f165041c] Performing Work::Engine::IndexAdder from EsqueuesMe(index\_adder) with arguments: "5d70d5accd7b75b751cd89bc", ["5d70d5c2cd7b75b751cd89c0", "5d70d5c2cd7b75b751cd89c1"]  
worker.1 | [2019-09-05T12:48:48.149+00:00][12003][2314][rails][WARN]: Failed to claim job 4a7070b0d56d1860a4ebec1c2551ce74f165041c, claim conflict occurred  
worker.1 | [2019-09-05T12:48:48.300+00:00][12003][2318][rails][INFO]: [ActiveJob] [Work::Engine::IndexAdder] [4a7070b0d56d1860a4ebec1c2551ce74f165041c] Adding document 5d70d5c2cd7b75b751cd89c0 to index for engine 5d70d5accd7b75b751cd89bc  
worker.1 | [2019-09-05T12:48:48.398+00:00][12003][2318][active\_job][INFO]: [ActiveJob] [Work::Engine::IndexAdder] [4a7070b0d56d1860a4ebec1c2551ce74f165041c] Performed Work::Engine::IndexAdder from EsqueuesMe(index\_adder) in 315.18ms  
worker.1 | [2019-09-05T12:48:48.401+00:00][12003][2318][rails][ERROR]: Retrying Work::Engine::IndexAdder in 300 seconds, due to a StandardError. The original exception was #\<NameError: uninitialized constant Swiftype::Loops\>.  
worker.1 | [2019-09-05T12:48:48.406+00:00][12003][2318][rails][INFO]: [ActiveJob] Enqueueing a job into the '.app-search-esqueues-me\_queue\_v1\_index\_adder' index. {"job\_type"=\>"ActiveJob::QueueAdapters::EsqueuesMeAdapter::JobWrapper", "payload"=\>{"args"=\>[{"job\_class"=\>"Work::Engine::IndexAdder", "job\_id"=\>"4a7070b0d56d1860a4ebec1c2551ce74f165041c", "queue\_name"=\>"index\_adder", "arguments"=\>["5d70d5accd7b75b751cd89bc", ["5d70d5c2cd7b75b751cd89c0", "5d70d5c2cd7b75b751cd89c1"]], "locale"=\>:en, "executions"=\>2}]}, "status"=\>"pending", "created\_at"=\>1567687728405, "perform\_at"=\>1567688028403, "attempts"=\>0}  
worker.1 | [2019-09-05T12:48:48.425+00:00][12003][2318][rails][INFO]: [ActiveJob] Ignoring duplicate job class=Work::Engine::IndexAdder, id=4a7070b0d56d1860a4ebec1c2551ce74f165041c, args=["5d70d5accd7b75b751cd89bc", ["5d70d5c2cd7b75b751cd89c0", "5d70d5c2cd7b75b751cd89c1"]]  
worker.1 | [2019-09-05T12:48:48.428+00:00][12003][2318][active\_job][INFO]: [ActiveJob] [2019-09-05 12:48:48 UTC] enqueued Work::Engine::IndexAdder job (4a7070b0d56d1860a4ebec1c2551ce74f165041c) on `index_adder`  
worker.1 | [2019-09-05T12:48:48.440+00:00][12003][2318][active\_job][INFO]: [ActiveJob] Enqueued Work::Engine::IndexAdder (Job ID: 4a7070b0d56d1860a4ebec1c2551ce74f165041c) to EsqueuesMe(index\_adder) at 2019-09-05 12:53:48 UTC with arguments: "5d70d5accd7b75b751cd89bc", ["5d70d5c2cd7b75b751cd89c0", "5d70d5c2cd7b75b751cd89c1"]  
worker.1 | [2019-09-05T12:48:48.444+00:00][12003][2318][rails][INFO]: Deleting: {:index=\>".app-search-esqueues-me\_queue\_v1\_index\_adder", :type=\>nil, :id=\>"4a7070b0d56d1860a4ebec1c2551ce74f165041c"}

Relevant line is:

[rails][ERROR]: Retrying Work::Engine::IndexAdder in 300 seconds, due to a StandardError. The original exception was #\<NameError: uninitialized constant Swiftype::Loops\>.

I've tried the 3 methods (json write, json load, curl) but same result

What happen?

Elasticsearch: 7.3.1  
ElasticApp Search: 7.3.1  
Java8  
Ubuntu

---

<div class="post-metadata">

**Author:** ![kikil592](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kikil592/32/40781_2.png) [@kikil592](https://discuss.elastic.co/u/kikil592)\
**Post date:** [September 6, 2019, 12:08pm UTC](https://discuss.elastic.co/t/nameerror-uninitialized-constant-swiftype-loops/198253/2 "2019-09-06T12:08:43Z")

</div>

Result is that documents can not be indexed...😕

---

<div class="post-metadata">

**Author:** ![orhantoy](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@orhantoy](https://discuss.elastic.co/u/orhantoy)\
**Post date:** [September 9, 2019, 7:31am UTC](https://discuss.elastic.co/t/nameerror-uninitialized-constant-swiftype-loops/198253/3 "2019-09-09T07:31:32Z")

</div>

Thanks for reporting this @kikil592 👍

We are planning on looking into this issue soon.  
Can you provide a bit more context on when you experience this issue? Do you see get this error when you try to index multiple documents or just one? Or are you not able to index documents at all?

---

<div class="post-metadata">

**Author:** ![kikil592](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kikil592/32/40781_2.png) [@kikil592](https://discuss.elastic.co/u/kikil592)\
**Post date:** [September 10, 2019, 1:11pm UTC](https://discuss.elastic.co/t/nameerror-uninitialized-constant-swiftype-loops/198253/4 "2019-09-10T13:11:42Z")

</div>

Hi @orhantoy,

I cannot index documents at all.

I have try the 3 ways to import (from json file, from json line, with curl) but no result, still the same error...

I have try with 1 document and 2 documents (the default docs provide as example)

---

<div class="post-metadata">

**Author:** ![orhantoy](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@orhantoy](https://discuss.elastic.co/u/orhantoy)\
**Post date:** [September 12, 2019, 6:18pm UTC](https://discuss.elastic.co/t/nameerror-uninitialized-constant-swiftype-loops/198253/5 "2019-09-12T18:18:34Z")

</div>

Version 7.3.2 has just been released and it includes a fix which I think is related to your issue. Please check it out and let us know how it goes ✌

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 10, 2019, 6:18pm UTC](https://discuss.elastic.co/t/nameerror-uninitialized-constant-swiftype-loops/198253/6 "2019-10-10T18:18:36Z")

</div>

Closed on October 10, 2019, 6:18pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
