mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Search across all content types via khoj.el on Emacs
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
This commit is contained in:
parent
2cd3e799d3
commit
5c4eb950d5
1 changed files with 3 additions and 1 deletions
|
@ -651,7 +651,9 @@ CONFIG is json obtained from Khoj config API."
|
|||
Use QUERY, CONTENT-TYPE and (optional) RERANK as query params"
|
||||
(let ((rerank (or rerank "false"))
|
||||
(encoded-query (url-hexify-string query)))
|
||||
(format "%s/api/search?q=%s&t=%s&r=%s&n=%s&client=emacs" khoj-server-url encoded-query content-type rerank khoj-results-count)))
|
||||
(if content-type
|
||||
(format "%s/api/search?q=%s&r=%s&n=%s&client=emacs" khoj-server-url encoded-query rerank khoj-results-count)
|
||||
(format "%s/api/search?q=%s&t=%s&r=%s&n=%s&client=emacs&t=%s" khoj-server-url content-type encoded-query rerank khoj-results-count))))
|
||||
|
||||
(defun khoj--query-search-api-and-render-results (query-url content-type query buffer-name)
|
||||
"Query Khoj Search with QUERY-URL.
|
||||
|
|
Loading…
Reference in a new issue