Skip to content
Snippets Groups Projects
Commit c705033e authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Adding document type, according the 'type' attribut present in metadata.

parent b4085e08
No related branches found
No related tags found
No related merge requests found
......@@ -280,6 +280,7 @@ def process_page( channel, method, properties, body, **kwargs):
#featurePages = getWFS(link) #
full_version = metadata_record.copy() # including metadata AND data
full_version['uuid'] = metadata_record['metadata-fr']['geonet:info']['uuid'] + '.full'
full_version['type'] = metadata_record['metadata-fr']['type']
msg = {'header': {'wfs_info': link, 'offset': 0, 'session_id': session_id, 'dest_index': dest_index}, 'body': full_version}
the_body = msgpack.packb(msg, use_bin_type=True)
......@@ -294,6 +295,7 @@ def process_page( channel, method, properties, body, **kwargs):
meta_version = metadata_record.copy() # including metadata ONLY
meta_version['uuid'] = metadata_record['metadata-fr']['geonet:info']['uuid'] + '.meta'
meta_version['type'] = metadata_record['metadata-fr']['type']
msg = {'header': { "index" : { "_index" : dest_index, "_type" : "_doc" } }, 'body': meta_version}
the_body = msgpack.packb(msg, use_bin_type=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment