-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add full-text search #21
feat: add full-text search #21
Conversation
a161138
to
81149b0
Compare
const Row = ({ index, style, data }: ListChildComponentProps) => { | ||
const frame = data[index]; | ||
const Row = ({ index, style }: ListChildComponentProps) => { | ||
const frame = filteredFrames[index]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SerCeMan
I fixed that regression which I caused in my previous PR
#19 (comment)
If you prefer I may provide a separate PR just for that fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I'll do another round of testing before releasing the extension.
@@ -347,6 +371,7 @@ export class AppStateStore { | |||
id: requestId, | |||
url: url, | |||
frames: [], | |||
index: new Index({tokenize: "full"}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deemed a "full"
search to be the best fit.
index every possible combination
https://github.com/nextapps-de/flexsearch#tokenizer-prefix-search
connection.frames.push(frame) | ||
connection.index.add(frame.id, (rSocketFrame as any)?.data ?? frame.text ?? frame.payload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my local tests this works for text frames and rsocket frames data.
Is there any basic thing I missed?
It would be possible to filter for specific frame types or other parts of the protocol, but needs parsing and mapping to human readable names.
https://github.com/rsocket/rsocket/blob/master/Protocol.md
81149b0
to
6f27d4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @AndyOGo! This looks like an awesome feature 🚀
const Row = ({ index, style, data }: ListChildComponentProps) => { | ||
const frame = data[index]; | ||
const Row = ({ index, style }: ListChildComponentProps) => { | ||
const frame = filteredFrames[index]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I'll do another round of testing before releasing the extension.
Hey, @AndyOGo! The new version should be available in the extension store now. |
[One line description of your change]
Motivation:
Find desired frames quicker.
[Explain here the context, and why you're making that change. What is the problem you're trying to solve.]
Modifications:
This PR adds a simple
<input />
field with full-text search powered byflexsearch
.fixes #20
[Describe the modifications you've done.]
Result:
[After your change, what will change.]
Text Frame:
RSocket Frame data: