Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,95 @@ setups['calendar_outages_addevent'] = setups['calendar_outages_addjob'] + '''
]}
'''

// Used by the retrievers-examples
buildRestTests.setups['retrievers_examples'] = '''
- do:
raw:
method: PUT
path: "retrievers_example"
body: |
{
"mappings": {
"properties": {
"vector": {
"type": "dense_vector",
"dims": 3,
"similarity": "l2_norm",
"index": true
},
"text": {
"type": "text"
},
"year": {
"type": "integer"
},
"topic": {
"type": "keyword"
}
}
}
}
- do:
raw:
method: POST
path: "retrievers_example/_doc/1"
body: |
{
"vector": [0.23, 0.67, 0.89],
"text": "Large language models are revolutionizing information retrieval by boosting search precision, deepening contextual understanding, and reshaping user experiences in data-rich environments.",
"year": 2024,
"topic": ["llm", "ai", "information_retrieval"]
}
- do:
raw:
method: POST
path: "retrievers_example/_doc/2"
body: |
{
"vector": [0.12, 0.56, 0.78],
"text": "Artificial intelligence is transforming medicine, from advancing diagnostics and tailoring treatment plans to empowering predictive patient care for improved health outcomes.",
"year": 2023,
"topic": ["ai", "medicine"]
}
- do:
raw:
method: POST
path: "retrievers_example/_doc/3"
body: |
{
"vector": [0.45, 0.32, 0.91],
"text": "AI is redefining security by enabling advanced threat detection, proactive risk analysis, and dynamic defenses against increasingly sophisticated cyber threats.",
"year": 2024,
"topic": ["ai", "security"]
}
- do:
raw:
method: POST
path: "retrievers_example/_doc/4"
body: |
{
"vector": [0.34, 0.21, 0.98],
"text": "Elastic introduces Elastic AI Assistant, the open, generative AI sidekick powered by ESRE to democratize cybersecurity and enable users of every skill level.",
"year": 2023,
"topic": ["ai", "elastic", "assistant"]
}
- do:
raw:
method: POST
path: "retrievers_example/_doc/5"
body: |
{
"vector": [0.11, 0.65, 0.47],
"text": "Learn how to spin up a deployment of our hosted Elasticsearch Service and use Elastic Observability to gain deeper insight into the behavior of your applications and systems.",
"year": 2024,
"topic": ["documentation", "observability", "elastic"]
}
- do:
raw:
method: POST
path: "retrievers_example/_refresh"
'''

// used by median absolute deviation aggregation
setups['reviews'] = '''
- do:
Expand Down
Loading
Loading