Add resource length to elasticsearch index
This commit is contained in:
parent
f8debcff87
commit
554cf14451
1 changed files with 2 additions and 0 deletions
|
@ -53,6 +53,7 @@ properties = {
|
|||
'time_horizon': {'type': 'keyword'},
|
||||
'orig_source': {'type': 'text'},
|
||||
'topics': {'type': 'text'},
|
||||
'length': {'type': 'integer'},
|
||||
'annotations': {'type': 'text', 'index': False},
|
||||
'sections': {
|
||||
'type': 'nested',
|
||||
|
@ -179,6 +180,7 @@ async def index_resource(
|
|||
'time_horizon': resource.search_fields.get('time_horizon'),
|
||||
'orig_source': resource.search_fields.get('orig_source'),
|
||||
'topics': resource.search_fields.get('topics'),
|
||||
'length': len(text),
|
||||
'annotations': pack_annotations(annotations),
|
||||
'sections': sections,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue