Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Add search endpoint, and initial search bar implementation #315

Closed
wants to merge 6 commits into from

Conversation

fstau
Copy link
Contributor

@fstau fstau commented May 13, 2022

Implements #287 with a few adjustments / proposals up for discussion.

@agnieszka-m
Search can be opened via icon in header. Input field has autofocus enabled.
Search can be closed by clicking outside the modal or hitting Esc while input field is focussed.
Search is triggered by hitting enter.

Before testing, adjustments to the .env.local are necessary - I assume that will also need to be set in Vercel.

Considerations / decisions to be made:

  • Display of search results: Due to the way the documents are indexed in Haystack, the search can and will often return partial markdown. We cannot render this to HTML reliably and displaying it in its original markdown state is not very pleasant. I'd propose to change the search endpoint in a way that it returns plain text. I am unfamiliar with the inner workings of Haystack, but I assume that is something that could be possible?
  • Opening the search: I could add a CMD / CTRL + K keyboard shortcut to open the search, making it easier to access. Is that something that would fit what you are going for?
  • Debounced search: Instead of waiting for the user to hit enter we could add a ~250-500ms debounced auto search after the user stops typing. Is this required?
  • Versions: With my examples I often got only results from older versions. The issue specifies that we should search only for the currently selected version, in my tests the result yield was somewhat low though. I have for now removed that filter and just sorted the latest version to the top, I am happy to revert that though if you prefer to stick to the filtered search.
  • Dead links: I have encountered a couple of dead links in the search results, that is something we should probably check for in the indexing process.

@vercel
Copy link

vercel bot commented May 13, 2022

@fstau is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented May 13, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
haystack-website ✅ Ready (Inspect) Visit Preview May 13, 2022 at 10:55AM (UTC)

@fstau fstau linked an issue Jun 1, 2022 that may be closed by this pull request
@masci
Copy link
Contributor

masci commented Sep 12, 2022

Closing as we're organising the docs elsewhere

@masci masci closed this Sep 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Design Search Bar
2 participants