Optional ReadonlynameThe index file's name, when its source has one (ByteSource.name).
ReadonlysourceChecksum of the source it was built from (Section B.8): of its
place table, or for RELEVANCE_AREA, of everything before its first
chunk. A reader only accepts the index when it matches its own.
ReadonlyplaceN, the number of places in the source; every one is indexed.
Readonlyhash2^hashExp shared lists for non-Latin trigrams (Section B.3).
ReadonlytopPlaces per short-query entry; 0 when the file has no table.
Readonlytop2^topBlockExp short-query entries per table block (Section B.6).
ReadonlyrelevanceThe order its short-query table is in: RELEVANCE_PLAIN (Section
B.5) or RELEVANCE_AREA (Section B.5.1).
L = 28^3 + 2^hashExp possible list indices.
StaticopenOpens a search index file (read on demand, like a .bin),
validating its header (Section B.10). Takes ownership of a
ByteSource: close() closes it, as does a failed open.
Closes the index's source.
Section B.9 steps 2-4: every place whose names could contain text,
ascending -- a superset of the real matches, which the caller still
has to confirm name by name. Undefined when text folds to fewer
than 3 symbols, i.e. the lists can't rule anything out.
Section B.9 step 1: the short-query table's entry for text -- its
top topCount places in relevance order (Section B.5), or [] when
nothing matches. Undefined when the file has no table or text
isn't one or two code points long once folded.
The key is foldDiacritics(text), so an accented query and its
unaccented spelling land on the same entry -- which is only the
right answer for a query that needed no folding in the first place.
Callers MUST therefore apply Section B.9 step 1's own precondition
(the query's folded form already equals its plain lowercase form)
before trusting this; CGeoDataReader.searchRanked does.
An open search index file (Appendix B). Opening reads and validates the header only. The list directory, each list, the table directory, and each table block are read the first time a query needs them, and kept behind WeakRefs, so an index that goes unused for weeks costs no memory beyond its header.
Opening does NOT verify the source checksum --
CGeoDataReader'suseSearchIndex()does that against the file it's attached to.