Searching Keywords by relatively long text

Hey guys,
I wanted some sort of keyword search system that we input a text(a couple of sentences) and search through keywords and return the most similar keywords based on the input text.
so far I used sentence transformers and fasis for indexing. right now the problem is when I input a sentence it doesn’t return keywords instead it returns a bunch of meaningless words. for encoding keywords I used distilbert.
So I was wondering did I do something wrong or my whole approach isn’t correct
Thanks :slightly_smiling_face: