Ranking and paging

How search orders its results, how the cursor works, and what the frequency rank means.

The order

Search is case-insensitive across the headword prefix, every inflected surface form and, for Japanese, the reading. Results come in rank order: an exact headword first, then an exact inflected surface or reading, then the prefix matches, and within each rank the more frequent entry before the less. Alphabetical order would lose the answer outright, since a short query's prefix matches outnumber the page.

It is the same ranking immit's own apps use, so what your user sees first is what a learner on immit sees first.

Paging

A page is at most 25 entries; a larger limit is capped, not refused. metadata.after is the cursor for the next page and metadata.before for the previous; both are null at the ends. Pass one back as after or before with the same query. Without a query the list is in headword order.

The frequency rank

frequency_rank is the entry's place in its language by corpus frequency, 1 the most frequent, null unranked. immit's display bands are a reasonable default for a client:

BandEnglish, rank up toJapanese, rank up to
Very common2,0002,000
Common8,00010,000
Uncommon20,00030,000
Rare50,00060,000
Very rarebeyond, or nullbeyond, or null