mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 09:25:06 +01:00
Fix querying with include word filter from web interface
- Not encoding the `query' string before querying the backend API with it was causing the "+" prefix for include word filter to be lost
This commit is contained in:
parent
1502fbc9e9
commit
c6fa09d8fc
1 changed files with 3 additions and 3 deletions
|
@ -63,10 +63,10 @@
|
|||
function search(rerank=false) {
|
||||
query = document.getElementById("query").value;
|
||||
type = document.getElementById("type").value;
|
||||
console.log(query, type);
|
||||
console.log(`Query: ${query}, Type: ${type}`);
|
||||
url = type === "image"
|
||||
? `/search?q=${query}&t=${type}&n=6`
|
||||
: `/search?q=${query}&t=${type}&n=6&r=${rerank}`;
|
||||
? `/search?q=${encodeURIComponent(query)}&t=${type}&n=6`
|
||||
: `/search?q=${encodeURIComponent(query)}&t=${type}&n=6&r=${rerank}`;
|
||||
fetch(url)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
|
Loading…
Reference in a new issue