-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Search across all Asymmetric Text Content Types in Parallel #232
Merged
debanjum
merged 22 commits into
master
from
parallelize-search-across-all-asymmetric-text-content-types
Jun 29, 2023
Merged
Search across all Asymmetric Text Content Types in Parallel #232
debanjum
merged 22 commits into
master
from
parallelize-search-across-all-asymmetric-text-content-types
Jun 29, 2023
Conversation
This file contains 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
- Update API to return content from all enabled content types when type is not set to specific type in HTTP request param - To do this efficiently run the search queries in parallel threads
- Add new filter abstract method to remove filter terms from query - Use the filter method to remove filter terms, encode this defiltered query and pass it to the query methods of each search types TODO: Encoding query is still taking 100-200 ms unlike before. Need to investigate why
Use timer to measure time to encode queries and total search time
If no content-type selected in transient menu option, khoj.el queries khoj server without content-type parameter (t) set. This results in search across all enabled asymmetric search text content types
debanjum
force-pushed
the
parallelize-search-across-all-asymmetric-text-content-types
branch
from
June 21, 2023 07:10
9827221
to
5c4eb95
Compare
debanjum
force-pushed
the
master
branch
3 times, most recently
from
June 21, 2023 08:57
75ab8f2
to
6d4aad5
Compare
sabaimran
approved these changes
Jun 22, 2023
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.
Sweet! This is a game changer 🎊 .
sabaimran
reviewed
Jun 22, 2023
…rch-across-all-asymmetric-text-content-types Conflicts: - src/khoj/routers/api.py: Use theirs
…server Allows moving logic to handle search across all content types to server from clients
debanjum
force-pushed
the
parallelize-search-across-all-asymmetric-text-content-types
branch
from
June 29, 2023 03:28
f62e4c2
to
5fc92e5
Compare
- So when searching across content types (with content-type = "all") org-mode results get rendered differently than markdown, PDF etc. results - Set div class for each result separately instead of a single uber div for styling. This allows styling div of each result based on the content-type of that result - No need to create placeholder "all" content type on web interface as server is passing an all content type by itself
…n khoj.el - Add "all" as default content type when no content type retrieved from server
- Set image_search.query to async to use it with multi-threading This is same as text_search.query being set to an async method - Exit search early if no search_model is defined in state.model
The text, image search query method has become async. So async/await is required to get results correctly in tests etc
debanjum
force-pushed
the
parallelize-search-across-all-asymmetric-text-content-types
branch
from
June 29, 2023 05:08
5fc92e5
to
f469d0a
Compare
debanjum
force-pushed
the
parallelize-search-across-all-asymmetric-text-content-types
branch
from
June 29, 2023 05:16
f469d0a
to
5f2717c
Compare
sabaimran
approved these changes
Jun 29, 2023
debanjum
deleted the
parallelize-search-across-all-asymmetric-text-content-types
branch
June 29, 2023 19:22
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.
95 ms
latency or140ms
at 90th percentile is inline with keeping an incremental search (search-as-you-type) experiencedefilter
method for each filter