---
# System prepended metadata

title: Site Search
tags: [Implementation]

---

---
tags: Implementation
---

# Site Search

Discussion related to selecting and implementing site search for conda.org.

One of our [key goals](https://hackmd.io/MyRHr6w9RViAyNRfifkuUg) is:

> 2. **Make it easy for community members and newcomers to find conda-related information, and to get started in the conda ecosystem**

Search plays a huge role in this goal.

# GitHub Issue(s)

* **[Site Search: Settle on search technology (#20)](https://github.com/conda-incubator/conda-dot-org/issues/20)**
* **[Site Search: Implement search (#21)](https://github.com/conda-incubator/conda-dot-org/issues/21)**
* [Site Search: Create list of sites / subsites / URLs to include in search (#19)](https://github.com/conda-incubator/conda-dot-org/issues/19)


# What should it offer?

## How should search work?

Should it be *list results as you type* or should it show a page of search results after entering the search?

## What should the results look like? 

Should results be categorized at all? How much, and what type of info, should be shown?

## Multiple site search?

Should the search return results from multiple sites, not just conda.org.

See [here for a list of possible external sites](https://hackmd.io/bafkvlx5SU2TvTGp4iTVkg).

# Possible Technologies

## Docusaurs Search

From the [Docusaurus Search page](https://docusaurus.io/docs/search):

> There are a few options you can use to add search to your website:
>
> - 🥇 [Algolia DocSearch](https://docusaurus.io/docs/search#using-algolia-docsearch) (**official**)
> - 👥 [Typesense DocSearch](https://docusaurus.io/docs/search#using-typesense-docsearch)
> - 👥 [Local Search](https://docusaurus.io/docs/search#using-local-search)
> - 👥 [Your own `SearchBar` component](https://docusaurus.io/docs/search#using-your-own-search)


## Google Programmable Engine Search

[Google Programmable Engine Search](https://programmablesearchengine.google.com/about/) takes advantage of Google's indexing and search chops to create what is basically a customized Google search that looks only at the sites and URLs you tell it to. See [here](https://galaxyproject.org/search/?q=conda#gsc.tab=0&gsc.q=conda&gsc.page=1) for how Galaxy uses this. 

Pros

* Supports including other sites in the search results.
* We get Google's core strengths.

Cons:

* Indexing is not immediately updated when the website is.

# Research

Hey guys, I researched the search options and came up with a quick Pros and Cons list. I am a fan of the search-as-you-type styles so I focused on TypeSense and DocSearch.

## TypeSense DocSearch:
Installation:
* Typesense Cloud
* Local Machine/Self Hosting
Pros:
* search-as-you-type experiences (typically sub-50ms)
* Open Source alternative to Algolia
* Easier to use than ElastiSearch
Cons:
* More work than Algolia and DocSearch
* Cloud service costs money

## DocSearch (Official) - free hosting version for all online technical documentation of open-source projects and technical blogs.
CHECKLIST
* You must be the owner of the website or update permissions.
* You'll need to include a JavaScript snippet to your frontend to implement DocSearch.
* Your website must be publicly available. We do not host search indices for websites only available after authentication or hosted on a private network.
* Your website must be a technical documentation of an open-source project or a technical blog. We do not index commercial content.
* Your website must be production ready. We won't index empty websites or those filled with placeholder content. Please, wait until you have written some documentation before applying. We would be happy to help you as soon as you have a steady design.

Pros:
* Possibly Free
* Algolia Crawler to index every section of your website.
* Hierarchical display
* Search as you type
* Easy to set up
* Alternative APIs

Cons:
* Not Guaranteed acceptance into the program
* 2+ week turnaround time for application
* APIs cost money

I would love to hear your thoughts and opinions.
