How to properly find one string in another using vector search

I need to search for the words in string (document) by their similarity to examples. For example I have string "I love the container with no. SADB21235236" and I have ref in elastic "SREB125136767". Then I need to find SADB21235236

I know that I can do vector search previously splitted string by words, but there are two little problems:

  1. My strings are extremely large
  2. It can be not one word, but a few words together, and to check every word... then pair... then tripple... I waste 3 times much time

I hope there is a functions that can help me :pensive:

  • Why I store examples, but not documents vectors itself in elastic?
  • My task is to find a string most similar to examples from document, but not find what document is the most similar to word. Basically it is word extraction from documents by references

Hi @andriy.afanasev :

I'm sorry, but I don't understand your use case.

Could you provide a practical example, including:

  • What do the documents look like?
  • What would be the search string?
  • What is the expected result given the stored documents?