# Create custom plugin to route

**URL:** https://discuss.elastic.co/t/create-custom-plugin-to-route/349342
**Category:** Elasticsearch
**Created:** [December 14, 2023, 9:33am UTC](https://discuss.elastic.co/t/create-custom-plugin-to-route/349342 "2023-12-14T09:33:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tung\_duong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tung_duong/32/129996_2.png) [@tung\_duong](https://discuss.elastic.co/u/tung_duong)
#### Post date: [December 14, 2023, 9:33am UTC](https://discuss.elastic.co/t/create-custom-plugin-to-route/349342/1 "2023-12-14T09:33:14Z")

</div>

-1

I am new to Elasticsearch. I currently need to design a plugin with the task of navigating my use of Elasticsearch. Specifically:

- 
  - I already have semantic search models, which can be used as an API, with output being embedding vectors

- 
  - I want the plugin to receive an input parameter, for example "use\_case", and when `use_case = 'semantic model'`, I will use the output of the above API to perform a search in the index. Of course, the index already contains dense vectors

- 
  - If `use_case = 'basic'` then I will use Elasticsearch search normally

I'm not sure if using a plugin is correct or not, but the desire is to completely separate Elasticsearch and my semantic models. And the end user will only need to manage this plugin

I learned about Elasticsearch but have not found a solution to this problem. I would like to receive everyone's opinions.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 11, 2024, 9:33am UTC](https://discuss.elastic.co/t/create-custom-plugin-to-route/349342/2 "2024-01-11T09:33:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
