Skip to content

Commit c62f0be

Browse files
authored
Merge pull request #474 from ror-community/single-search-marple-implementation
Adding single search
2 parents e8ec3bf + ea185da commit c62f0be

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

rorapi/management/commands/indexror.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import pathlib
1010
import shutil
1111
from rorapi.settings import ES7, ES_VARS, DATA
12+
import random
1213

1314
from django.core.management.base import BaseCommand
1415
from elasticsearch import TransportError
@@ -191,8 +192,10 @@ def index(dataset, version):
191192
'id': n
192193
} for n in get_nested_ids_v1(org)]
193194
body.append(org)
194-
print(body[0])
195-
print(body[8])
195+
print("example_1: ", body[0])
196+
print("example_1: ", body[1])
197+
print("example_2: ", body[8])
198+
print("example_2: ", body[9])
196199
ES7.bulk(body)
197200
except TransportError:
198201
err[index.__name__] = f"Indexing error, reverted index back to previous state"

rorapi/management/commands/indexrordump.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ def index_dump(self, filename, index, dataset):
9898
'id': n
9999
} for n in get_nested_ids_v1(org)]
100100
body.append(org)
101-
print(body[0])
102-
print(body[8])
101+
print("example_1: ", body[0])
102+
print("example_1: ", body[1])
103+
print("example_2: ", body[8])
104+
print("example_2: ", body[9])
103105
ES7.bulk(body)
104106
except TransportError:
105107
self.stdout.write(TransportError)

0 commit comments

Comments
 (0)