5#include <portals/detail/list_text.hpp>
6#include <portals/model.hpp>
96 std::vector<SearchHighlight>
highlights = std::vector<SearchHighlight>(0);
118 return !
owner.owner_before(other.owner) && !other.owner.owner_before(
owner) &&
pin == other.pin &&
127 std::string
query = std::string(0,
'\0');
129 std::vector<ModelRow<SearchItem>>
rows = std::vector<ModelRow<SearchItem>>(0);
Owning validated UTF-8 and immutable extended grapheme measurements.
Definition text.hpp:145
Public Portals API.
Definition action.hpp:8
SearchError
Search/provider errors, separate from scheduler and UI delivery errors.
Definition search.hpp:12
SearchStrategy
Indexed term-prefix strategy; fuzzy edit distance is over normalized graphemes.
Definition search.hpp:24
@ FUZZY_PREFIX
Also allow one insertion/deletion/substitution from three query graphemes.
Definition search.hpp:26
@ PREFIX
Exact normalized prefix of the complete label or a whitespace token.
Definition search.hpp:25
@ NOT_READY
Immutable provider range is pending or failed; no I/O was started.
Definition find_bar.hpp:54
@ INVALID_TEXT
Projected row is not admitted UTF-8 under the scene text policy.
Definition find_bar.hpp:53
@ CALLBACK_FAILED
A non-allocation exception escaped into a runner callback boundary.
Definition application.hpp:34
@ NO_MEMORY
Allocation failed at a runner exception boundary.
Definition application.hpp:33
@ CANCELLED
Explicit cancellation or replacement stopped the invocation.
Definition async.hpp:29
@ INVALID_ARGUMENT
Empty task, callback or immutable data owner, or invalid policy.
Definition async.hpp:26
@ UNAVAILABLE
A hosted session requires a borrowed executor.
Definition background_options.hpp:13
@ LIMIT_EXCEEDED
A storage request cannot fit its configured aggregate budget.
Definition background_options.hpp:19
@ STALE_SOURCE
Result does not have the exact requested source revision.
Definition model_query.hpp:16
Provider-assigned row identity, independent of position; increment generation on reuse.
Definition row_id.hpp:9
Half-open byte range in the original label, always on complete grapheme boundaries.
Definition search.hpp:48
std::size_t begin
Inclusive original UTF-8 byte offset.
Definition search.hpp:49
std::size_t end
Exclusive original UTF-8 byte offset.
Definition search.hpp:50
bool operator==(const SearchHighlight &) const noexcept=default
SearchRank rank
Exact deterministic provider rank.
Definition search.hpp:97
SearchItem()=default
Construct an empty item inside a checked allocation boundary.
std::vector< SearchHighlight > highlights
Whole original grapheme ranges.
Definition search.hpp:96
const GraphemeText & text() const noexcept
Definition search.hpp:100
SearchItem & operator=(SearchItem &&other) noexcept
Transfer bounded output without allocating another container proxy.
Definition search.hpp:88
std::shared_ptr< const detail::PreparedListText > presentation
Bounded prevalidated worker display.
Definition search.hpp:95
SearchItem(const SearchItem &)=default
Copy only bounded presentation and highlight data.
SearchItem(SearchItem &&other)
Transfer output through a potentially throwing empty-container construction. MSVC checked iterators a...
Definition search.hpp:80
SearchItem & operator=(const SearchItem &)=default
Configurable finite source, index, query and result budgets.
Definition search.hpp:30
std::size_t maxQueryScratchBytes
Query frontier/DP/dedup allocation-capacity ceiling.
Definition search.hpp:43
std::size_t maxRowGraphemes
Maximum source graphemes per label.
Definition search.hpp:34
std::size_t maxIndexBytes
Resident/transient resident allocation-capacity ceiling.
Definition search.hpp:38
std::size_t maxProjectedBytes
Maximum original projected UTF-8 bytes per index.
Definition search.hpp:32
std::size_t maxHighlightRangesPerItem
Maximum merged whole-grapheme highlight ranges.
Definition search.hpp:41
SearchStrategy strategy
Prefix or one-edit prefix matching.
Definition search.hpp:44
std::size_t maxQueryGraphemes
Maximum normalized query graphemes.
Definition search.hpp:36
std::size_t maxRowBytes
Maximum bytes in one suggestion label.
Definition search.hpp:33
std::size_t maxQuerySteps
Grapheme DP cells, heap pushes/pops and postings examined.
Definition search.hpp:42
std::size_t maxTermsPerRow
Complete label plus nonempty whitespace tokens.
Definition search.hpp:37
std::size_t maxSourceRows
Maximum immutable source rows.
Definition search.hpp:31
std::size_t maxBuildScratchBytes
Independent build scratch ceiling.
Definition search.hpp:39
std::size_t maxQueryBytes
Maximum owning query bytes, independently editor-limited.
Definition search.hpp:35
std::size_t topK
Exact output count bound, configurable from one to256.
Definition search.hpp:40
Deterministic rank. Smaller tuple sorts first; source ordinal resolves equal scores.
Definition search.hpp:56
std::uint64_t sourceOrdinal
Stable order in this exact source pin.
Definition search.hpp:60
std::uint8_t edits
Zero or one normalized-grapheme edit.
Definition search.hpp:57
RowId row
Final tie break includes row generation.
Definition search.hpp:61
auto tuple() const noexcept
Definition search.hpp:64
std::size_t unmatched
Remaining normalized term graphemes.
Definition search.hpp:59
bool token
Full-label terms precede token-only matches.
Definition search.hpp:58
Immutable bounded search value, distinct from QueryPage<T> and source row count.
Definition search.hpp:125
SearchSourceIdentity source
Exact weak source identity; does not own the index.
Definition search.hpp:126
bool hasMore
One further distinct result was proven.
Definition search.hpp:130
std::vector< ModelRow< SearchItem > > rows
Ranked deduplicated top-K.
Definition search.hpp:129
std::string query
Owning original query bytes.
Definition search.hpp:127
std::size_t querySteps
Counted worker query work, independent of UI/frame time.
Definition search.hpp:131
std::uint64_t generation
Latest UI query intent, not a source/result revision.
Definition search.hpp:128
Exact source identity independent of a result model's publication revision.
Definition search.hpp:106
std::uint64_t session
Provider/projection instance; nonzero and never recycled.
Definition search.hpp:110
std::uint64_t normalizationVersion
Canonical-compose/full-casefold mapping algorithm version.
Definition search.hpp:111
WidthPolicy width
Complete text measurement policy.
Definition search.hpp:112
bool operator==(const SearchSourceIdentity &other) const noexcept
Definition search.hpp:117
const void * pin
Exact source snapshot address, compared together with owner identity.
Definition search.hpp:108
std::uint64_t revision
Domain source revision.
Definition search.hpp:109
std::weak_ptr< const void > owner
Control-block identity without retaining arbitrary source payload.
Definition search.hpp:107
Owning deterministic width policy; no font or terminal matching promise.
Definition text.hpp:42