cdp-frontend
cdp-frontend copied to clipboard
Better searching in TranscriptSearch.tsx
Use Case
Please provide a use case to help us understand your request in context From @JacksonMaxfield #61: "Weird idea, and maybe something to just add an issue for to solve later or for someone else to take on at the hackathon or something. But it may be nice to come up with a system for substringing the text based off of the users query to reduce the amount of words in the resulting sentence. I.e. take the "Transcript Item w/ Search Query" storybook example. That is a long sentence, what if, when searching, the user types in a couple of words and just like the other event card system where we substring and find the prior N and tailing N words around the query result. So the sentence is: "Hi, I am hear today to discuss the addition of the proposed 35th avenue bike lane and how I think it will be a massive benefit to the whole community." That is a short example sentence, but using it, we say someone searches for "bike lane" and we have it parametrized to give the prior and tailing 7 words, the transcript search would show: "... the addition of the proposed 35th avenue bike lane and how I think it will be..." This is totally just a random thought and maybe something to add later after we deploy v3 and see all of this in action."
Modify the search results so that the speaker's text contains the searched query and N prior and N tailing words.
Example: ... N words <searched query> N words ...
One thing to consider: what if the sentence contains more than one instance of the searched query?
Solution
Please describe your ideal solution
Alternatives
Please describe any alternatives you've considered, even if you've dismissed them