feat: Search snippets and appmap events using sqlite#2123
Draft
feat: Search snippets and appmap events using sqlite#2123
Conversation
kgilpin
commented
Nov 23, 2024
| @@ -0,0 +1,136 @@ | |||
| import { ContextV2 } from '@appland/navie'; | |||
Contributor
Author
There was a problem hiding this comment.
This file is essentially buildContext, but with a more (IMO) clear name, since the job of the function is not just to build the context, but to collect it from the available assets.
kgilpin
commented
Nov 23, 2024
| { | ||
| name: '@test', | ||
| description: 'Write tests for your code.', | ||
| referenceUrl: 'https://appmap.io/docs/navie-reference/navie-commands.html#test', |
Contributor
Author
There was a problem hiding this comment.
Restore these changes before merge
kgilpin
commented
Nov 23, 2024
| @@ -1,83 +0,0 @@ | |||
| import { EventEmitter } from 'stream'; | |||
Contributor
Author
There was a problem hiding this comment.
Be sure to restore this.
03cdf79 to
4545b12
Compare
394ec08 to
921fbdb
Compare
4545b12 to
0967960
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the old/existing algorithm, the search context collects events from AppMap data, then looks up the source code for the code objects represented in that event list. Then it supplements these search results with some text snippets. The ratio of event-based results to text-search-based results is 3 to 1:
https://github.com/getappmap/appmap-js/pull/2123/files#diff-b247cb5820889b6fdee4a942ce59747b9dd5285ee212a7b89a840470b41c600dL129
In this new implementation, events and code snippets are combined together in the same index, and search and ranked together.
This prevents the search results from being dominated by AppMap events, in the case that the AppMap data is not truly very relevant to the search.