-
Notifications
You must be signed in to change notification settings - Fork 17
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: Search snippets and appmap events using sqlite #2123
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,136 @@ | |||
import { ContextV2 } from '@appland/navie'; |
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.
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.
@@ -39,18 +39,6 @@ export function navieMetadataV1(): RpcHandler< | |||
{ | |||
name: '@test', | |||
description: 'Write tests for your code.', | |||
referenceUrl: 'https://appmap.io/docs/navie-reference/navie-commands.html#test', |
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.
Restore these changes before merge
@@ -1,83 +0,0 @@ | |||
import { EventEmitter } from 'stream'; |
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.
Be sure to restore this.
03cdf79
to
4545b12
Compare
394ec08
to
921fbdb
Compare
4545b12
to
0967960
Compare
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.