Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
🚀
This server has been upgraded to GitLab release
15.7
.
🚀
Open sidebar
memoriav
Memobase 2020
utilities
Import Process CLI
Commits
20c2835e
Commit
20c2835e
authored
Apr 06, 2021
by
Jonas Waeber
Browse files
First version object map.
parent
d032b4a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
utilities/old-memobase-id-map/object_map.txt
0 → 100644
View file @
20c2835e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
utilities/old-memobase-id-map/script.py
0 → 100644
View file @
20c2835e
from
simple_elastic
import
ElasticIndex
if
__name__
==
'__main__'
:
index
=
ElasticIndex
(
'documents-v19'
,
url
=
'localhost:8080'
)
query
=
{
"_source"
:
{
"includes"
:
[
"id"
,
"oldMemobaseId"
]
},
"query"
:
{
"exists"
:
{
"field"
:
"oldMemobaseId"
}
}
}
with
open
(
'object_map.txt'
,
'w'
)
as
fp
:
for
items
in
index
.
scroll
(
query
=
query
,
size
=
1000
):
for
item
in
items
:
fp
.
write
(
f
'
{
item
[
"oldMemobaseId"
]
}
{
item
[
"id"
]
}
\n
'
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment