Created
September 2, 2025 17:58
-
-
Save xeraa/8f0f4b2d09b583145de8b10bffb1be54 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GET / | |
| GET _analyze | |
| { | |
| "text": "These are <em>not</em> the droids you are looking for." | |
| } | |
| PUT starwars | |
| { | |
| "settings": { | |
| "analysis": { | |
| "analyzer": { | |
| "my_analyzer": { | |
| "char_filter": [ | |
| "html_strip" | |
| ], | |
| "tokenizer": "standard", | |
| "filter": [ | |
| "lowercase", | |
| "stop", | |
| "snowball" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "mappings": { | |
| "properties": { | |
| "quote": { | |
| "type": "text", | |
| "analyzer": "my_analyzer" | |
| } | |
| } | |
| } | |
| } | |
| GET starwars/_analyze | |
| { | |
| "field": "quote", | |
| "text": "These are <em>not</em> the droids you are looking for." | |
| } | |
| PUT starwars/_doc/1 | |
| { | |
| "quote": "These are <em>not</em> the droids you are looking for.", | |
| "speaker": "Obi-Wan Kenobi" | |
| } | |
| PUT starwars/_doc/2 | |
| { | |
| "quote": "<b>No.</b> I am your father.", | |
| "speaker": "Darth Vader" | |
| } | |
| GET starwars/_search | |
| { | |
| "query": { | |
| "match": { | |
| "quote": "Droid" | |
| } | |
| } | |
| } | |
| GET starwars/_search | |
| { | |
| "query": { | |
| "match": { | |
| "quote": "robot" | |
| } | |
| } | |
| } | |
| PUT _inference/text_embedding/openai | |
| { | |
| "service": "openai", | |
| "service_settings": { | |
| "api_key": "...", | |
| "model_id": "text-embedding-3-small", | |
| "dimensions": 128 | |
| } | |
| } | |
| GET _inference | |
| PUT semantic-starwars | |
| { | |
| "settings": { | |
| "analysis": { | |
| "analyzer": { | |
| "my_analyzer": { | |
| "char_filter": [ | |
| "html_strip" | |
| ], | |
| "tokenizer": "standard", | |
| "filter": [ | |
| "lowercase", | |
| "stop", | |
| "snowball" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "mappings": { | |
| "properties": { | |
| "quote": { | |
| "type": "text", | |
| "analyzer": "my_analyzer", | |
| "copy_to": ["quote_elser", "quote_openai"] | |
| }, | |
| "quote_elser": { | |
| "type": "semantic_text", | |
| "inference_id": ".elser-2-elasticsearch" | |
| }, | |
| "quote_openai": { | |
| "type": "semantic_text", | |
| "inference_id": "openai" | |
| } | |
| } | |
| } | |
| } | |
| POST _reindex | |
| { | |
| "source": { | |
| "index": "starwars" | |
| }, | |
| "dest": { | |
| "index": "semantic-starwars" | |
| } | |
| } | |
| GET semantic-starwars/_doc/1 | |
| GET semantic-starwars/_mapping | |
| GET semantic-starwars/_search | |
| { | |
| "query": { | |
| "match": { | |
| "quote": "robot" | |
| } | |
| } | |
| } | |
| GET semantic-starwars/_search | |
| { | |
| "query": { | |
| "match": { | |
| "quote_elser": "robot" | |
| } | |
| } | |
| } | |
| GET semantic-starwars/_search | |
| { | |
| "query": { | |
| "match": { | |
| "quote_openai": "robot" | |
| } | |
| } | |
| } | |
| PUT semantic-starwars/_doc/3 | |
| { | |
| "quote": "Do or do not. There is no try. I’ve got a bad feeling about this. It’s a trap! The Force will be with you. Always. I find your lack of faith disturbing. Help me, Obi-Wan Kenobi. You’re my only hope. No. I am your father. You were the chosen one! It was said that you would destroy the Sith, not join them! I am a Jedi, like my father before me. Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering. In my experience, there’s no such thing as luck. I’ve been waiting for you. We meet again at last. You don’t know the power of the dark side. Your focus determines your reality. So this is how liberty dies… with thunderous applause. I’m just a simple man trying to make my way in the universe. Now, young Skywalker… you will die. I love you. I know. Never tell me the odds. Chewie, we’re home. I will not be the last Jedi. Something inside me has always been there… but now it’s awake. I need someone to show me my place in all this. Let the past die. Kill it if you have to. The ability to speak does not make you intelligent. We’re not alone. Good people will fight if we lead them. This is the way. I have spoken. I like firsts. Good or bad, they’re always memorable. I’m one with the Force. The Force is with me. The sacred Jedi texts! They were not page-turners. The greatest teacher, failure is. Confronting fear is the destiny of a Jedi. Your journey… yes, your journey. A Jedi uses the Force for knowledge and defense, never for attack. We’re all fine here now, thank you. How are you? Hokey religions and ancient weapons are no match for a good blaster at your side, kid. I’m not a committee! You came in that thing? You’re braver than I thought. Laugh it up, fuzzball. That’s no moon. It’s a space station. You may dispense with the pleasantries, Commander. I’m here to put you back on schedule. If you’re not with me, then you’re my enemy. Only a Sith deals in absolutes. I have the high ground. You underestimate my power! I hate sand. It’s coarse and rough and irritating… and it gets everywhere. So uncivilized. These aren’t the droids you’re looking for. Move along. Stay on target. Use the Force, Luke. You will never find a more wretched hive of scum and villainy. I suggest you rethink your strategy. There’s always a bigger fish. He’s no good to me dead. Your eyes can deceive you. Don’t trust them. It’s over, Anakin. I have the high ground. I’m a pilot, you know. I’ve flown from one side of this galaxy to the other. Judge me by my size, do you? Luminous beings are we, not this crude matter. You must unlearn what you have learned. A surprise, to be sure, but a welcome one. This party’s over. I will do what I must. You were my brother, Anakin! I loved you! I sense a disturbance in the Force. The dark side of the Force is a pathway to many abilities some consider to be unnatural. I am the Senate. Unlimited power! They fly now? They fly now. Somehow Palpatine returned. This is where the fun begins. I know what I have to do, but I don’t know if I have the strength to do it. You’re a little short for a stormtrooper. That’s how we’re gonna win. Not fighting what we hate. Saving what we love. I’m Rey… Rey Skywalker. May the Force be with you.", | |
| "speaker": "various" | |
| } | |
| GET semantic-starwars/_search | |
| { | |
| "query": { | |
| "match": { | |
| "quote_elser": "murder" | |
| } | |
| }, | |
| "highlight": { | |
| "fields": { | |
| "quote_elser": { | |
| "order": "score", | |
| "number_of_fragments": 1 | |
| } | |
| } | |
| } | |
| } | |
| GET semantic-starwars/_search | |
| { | |
| "retriever": { | |
| "linear": { | |
| "retrievers": [ | |
| { | |
| "retriever": { | |
| "standard": { | |
| "query": { | |
| "match": { | |
| "quote": "droid" | |
| } | |
| } | |
| } | |
| }, | |
| "weight": 2, | |
| "normalizer": "minmax" | |
| }, | |
| { | |
| "retriever": { | |
| "standard": { | |
| "query": { | |
| "match": { | |
| "quote_openai": "robot" | |
| } | |
| } | |
| } | |
| }, | |
| "weight": 1.5, | |
| "normalizer": "minmax" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| GET semantic-starwars/_search | |
| { | |
| "explain": true, | |
| "retriever": { | |
| "rrf": { | |
| "retrievers": [ | |
| { | |
| "standard": { | |
| "query": { | |
| "match": { | |
| "quote": "droid" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "standard": { | |
| "query": { | |
| "match": { | |
| "quote_elser": "robot" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| // https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/onechat/README.md | |
| POST kbn://internal/kibana/settings | |
| { | |
| "changes": { | |
| "onechat:mcp:enabled": true, | |
| "onechat:a2a:enabled": true, | |
| "onechat:api:enabled": true, | |
| "onechat:ui:enabled": true, | |
| "onechat:tools:enabled": true | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment