def create_index_op(record): index, doc_type = current_record_to_index(record) return { '_op_type': 'index', '_index': index, '_type': doc_type, '_id': str(record.id), '_version': record.revision_id, '_version_type': 'external_gte', '_source': RecordIndexer._prepare_record(record, index, doc_type), }
def create_index_op(record): index, doc_type = current_record_to_index(record) return { '_op_type': 'index', '_index': index, '_type': doc_type, '_id': str(record.id), '_version': record.revision_id, '_version_type': 'external_gte', '_source': RecordIndexer._prepare_record(record, index, doc_type), }
def create_index_op(record, version_type='external_gte'): from inspirehep.modules.records.receivers import enhance_before_index index, doc_type = current_record_to_index(record) enhance_before_index(record) return { '_op_type': 'index', '_index': index, '_type': doc_type, '_id': str(record.id), '_version': record.revision_id, '_version_type': version_type, '_source': InspireRecordIndexer._prepare_record(record, index, doc_type), }
def create_index_op(record, version_type='external_gte'): from inspirehep.modules.records.receivers import enhance_before_index index, doc_type = current_record_to_index(record) enhance_before_index(record) return { '_op_type': 'index', '_index': index, '_type': doc_type, '_id': str(record.id), '_version': record.revision_id, '_version_type': version_type, '_source': RecordIndexer._prepare_record(record, index, doc_type), }