block / block/elasticgraph

[Website] API docs search broken

Open
#1,187 0 comments 0 reactions 0 assignees View on GitHub
good first issue help wanted website
Dominant language
Ruby
Stars
88
Forks
36
Avg merge
5d 10h
Merged PRs (30d)
18

Description

## The Problem

The YARD docs provide a search box that worked in the past. For example, here's the search from the [1.1.0 docs](https://block.github.io/elasticgraph/api-docs/v1.1.0/):

Image

"There are 106 results" doesn't seem accurate, but it does return matches.

On the [1.2.0 docs](https://block.github.io/elasticgraph/api-docs/v1.2.0/) and [main docs](), this is broken:

Image

...although the "There are 11 results" might be more accurate.

On 1.2.0/main, the `Methods` search seems to work fine, and the `Class` search appears to work on the visible classes. For example, if I search on `Schema` then it changes from this:

Image

to this:

Image

But if I first expand some of the module/class namespaces:

Image

...and then try searching, it matches more classes:

Image

So I guess it's only searching from among the "visible" classes?

## How to Fix

I suspect this is a regression in `yard`, our documentation tool.

* Figure out which version it regressed in. (You can downgrade yard and run `be rake site:serve` to play around locally on the `main` docs as they are regenerated with that command).
* Report the bugs upstream to the [YARD project](https://github.com/lsegal/yard).
* Downgrade YARD here in ElasticGraph to a version which is not broken.
* Regenerate the 1.2.0 docs (by checking the code out at the `v1.2.0` tag) so they are fixed.

See #1049 for some prior art.

Note: I'd like to see all the bugs here get fixed (including this mistaken match counts) but given a choice between the counts being off and seeing results vs accurate counts but no visible results, I'd prefer the former.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.