Web: link and serve the file
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
.result-header { font-weight: bold; color: #333; margin-bottom: 10px; }
|
||||
.result-text { background: #f9f9f9; padding: 10px; border-radius: 3px; }
|
||||
.distance { color: #666; font-size: 0.9em; }
|
||||
.document-link { color: #007cba; text-decoration: none; }
|
||||
.document-link:hover { text-decoration: underline; }
|
||||
.no-results { text-align: center; color: #666; margin: 40px 0; }
|
||||
.loading { text-align: center; color: #007cba; margin: 20px 0; }
|
||||
</style>
|
||||
@@ -56,7 +58,7 @@
|
||||
resultsDiv.innerHTML = data.results.map((result, i) => `
|
||||
<div class="result">
|
||||
<div class="result-header">
|
||||
Result ${i + 1} - ${result.document}
|
||||
Result ${i + 1} - <a href="/file/${encodeURIComponent(result.document_path)}" class="document-link" target="_blank">${result.document}</a>
|
||||
<span class="distance">(Distance: ${result.distance.toFixed(4)})</span>
|
||||
</div>
|
||||
<div>Page: ${result.page}, Chunk: ${result.chunk}</div>
|
||||
|
||||
Reference in New Issue
Block a user