|
| 1 | +{ |
| 2 | + "name": "${{template.name}}", |
| 3 | + "description": "${{template.description}}", |
| 4 | + "use_case": "HYBRID_SEARCH", |
| 5 | + "version": { |
| 6 | + "template": "1.0.0", |
| 7 | + "compatibility": [ |
| 8 | + "2.12.0", |
| 9 | + "3.0.0" |
| 10 | + ] |
| 11 | + }, |
| 12 | + "workflows": { |
| 13 | + "provision": { |
| 14 | + "nodes": [ |
| 15 | + { |
| 16 | + "id": "register_local_pretrained_model", |
| 17 | + "type": "register_local_pretrained_model", |
| 18 | + "user_inputs": { |
| 19 | + "name": "${{register_local_pretrained_model.name}}", |
| 20 | + "version": "${{register_local_pretrained_model.version}}", |
| 21 | + "description": "${{register_local_pretrained_model.description}}", |
| 22 | + "model_format": "${{register_local_pretrained_model.model_format}}", |
| 23 | + "deploy": true |
| 24 | + } |
| 25 | + }, |
| 26 | + { |
| 27 | + "id": "create_ingest_pipeline", |
| 28 | + "type": "create_ingest_pipeline", |
| 29 | + "previous_node_inputs": { |
| 30 | + "register_local_pretrained_model": "model_id" |
| 31 | + }, |
| 32 | + "user_inputs": { |
| 33 | + "pipeline_id": "${{create_ingest_pipeline.pipeline_id}}", |
| 34 | + "configurations": { |
| 35 | + "description": "${{create_ingest_pipeline.description}}", |
| 36 | + "processors": [ |
| 37 | + { |
| 38 | + "text_embedding": { |
| 39 | + "model_id": "${{register_local_pretrained_model.model_id}}", |
| 40 | + "field_map": { |
| 41 | + "${{text_embedding.field_map.input}}": "${{text_embedding.field_map.output}}" |
| 42 | + } |
| 43 | + } |
| 44 | + } |
| 45 | + ] |
| 46 | + } |
| 47 | + } |
| 48 | + }, |
| 49 | + { |
| 50 | + "id": "create_index", |
| 51 | + "type": "create_index", |
| 52 | + "previous_node_inputs": { |
| 53 | + "create_ingest_pipeline": "pipeline_id" |
| 54 | + }, |
| 55 | + "user_inputs": { |
| 56 | + "index_name": "${{create_index.name}}", |
| 57 | + "configurations": { |
| 58 | + "settings": { |
| 59 | + "index.knn": true, |
| 60 | + "default_pipeline": "${{create_ingest_pipeline.pipeline_id}}", |
| 61 | + "number_of_shards": "${{create_index.settings.number_of_shards}}", |
| 62 | + "index.search.default_pipeline": "${{create_search_pipeline.pipeline_id}}" |
| 63 | + }, |
| 64 | + "mappings": { |
| 65 | + "properties": { |
| 66 | + "${{text_embedding.field_map.output}}": { |
| 67 | + "type": "knn_vector", |
| 68 | + "dimension": "${{text_embedding.field_map.output.dimension}}", |
| 69 | + "method": { |
| 70 | + "engine": "${{create_index.mappings.method.engine}}", |
| 71 | + "space_type": "${{create_index.mappings.method.space_type}}", |
| 72 | + "name": "${{create_index.mappings.method.name}}", |
| 73 | + "parameters": {} |
| 74 | + } |
| 75 | + }, |
| 76 | + "${{text_embedding.field_map.input}}": { |
| 77 | + "type": "text" |
| 78 | + } |
| 79 | + } |
| 80 | + } |
| 81 | + } |
| 82 | + } |
| 83 | + }, |
| 84 | + { |
| 85 | + "id": "create_search_pipeline", |
| 86 | + "type": "create_search_pipeline", |
| 87 | + "user_inputs": { |
| 88 | + "pipeline_id": "${{create_search_pipeline.pipeline_id}}", |
| 89 | + "configurations": { |
| 90 | + "description": "Post processor for hybrid search", |
| 91 | + "phase_results_processors": [ |
| 92 | + { |
| 93 | + "normalization-processor": { |
| 94 | + "normalization": { |
| 95 | + "technique": "${{normalization-processor.normalization.technique}}" |
| 96 | + }, |
| 97 | + "combination": { |
| 98 | + "technique": "${{normalization-processor.combination.technique}}" |
| 99 | + } |
| 100 | + } |
| 101 | + } |
| 102 | + ] |
| 103 | + } |
| 104 | + } |
| 105 | + } |
| 106 | + ] |
| 107 | + } |
| 108 | + } |
| 109 | +} |
0 commit comments