mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00: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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user