brillout / brillout/docpress

[Algolia] Improve order

Open
#32 3 comments 0 reactions 1 assignee Claimed by @phonzammi View on GitHub
Dominant language
TypeScript
Stars
14
Forks
7
Avg merge
14m
Merged PRs (30d)
3

Description

How about this:

```
==========================
==== SECTION MATCHES =====
==========================

Show all `hit.type = 'page'`
Show all `hit.type = 'section'`

==========================
==== CONTENT MATCHES =====
==========================

Show all `hit.type = 'content'`

===================== FUZZY MATCHING ====================

Same as above but when the match isn't an exact match:

==========================
==== SECTION MATCHES =====
==========================

Show all `hit.type = 'page'` (fuzzy)
Show all `hit.type = 'section'` (fuzzy)

==========================
==== CONTENT MATCHES =====
==========================

Show all `hit.type = 'content'` (fuzzy)
```

In other words:
1. First, only exact matches, in this order:
1. `hit.type === 'page'`
1. `hit.type === 'section'`
1. `hit.type === 'content'`
1. Last, fuzzy matches, in the same order:
1. `hit.type === 'page'`
1. `hit.type === 'section'`
1. `hit.type === 'content'`

I wonder whether/how we could visually delimit/bundle these different types of search results. But I guess we can only focus on the order for now.

@phonzammi What are all the possible `hit.type` values?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.