materio_sapi: result messages with real plurals; without any exact
match the results are called close (the neighbour search always finds
some). Former help sentence of the base page kept, French corrected.
Messages in SearchMessage, unit tested; French added by update 11002.
materiotheme: placeholder "Describe the material you are looking for",
wider search field, "?" button with a help tooltip and clickable
examples, "Loading…", "End of results"; texts in vuejs/i18n/search.js.
Page title "Base" restored without a search (keys is an array, test its
length).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
- materio_sapi: MaterioSapiSearchForm, AjaxSearchForm and the
/materio_sapi/search_form route removed, with the fieldset legend hook
they needed. The search block is only the place where the Vue field
mounts (placement and access unchanged).
- materiotheme: filters removed from the search store and Base.vue (the
parameter of former URLs is ignored), formhtml removed from main.js and
SearchBlock.vue, filter styles and SlimSelect import removed.
- slim-select uninstalled, with its postinstall patch step.
- Production build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
- ScoreCut: the kNN search scores every visible node; keep the ones above
the mean of this search by more than 2 standard deviations. A fixed
threshold meant nothing (at 0.7, « bois » 664 nodes, « wood » 4 671);
with k = 2, 373 and 382. Exact matches stay first.
- OR query off (OR_WITH_KNN), kept as the fallback when there are no
neighbours: model stopped, slow or switched off, term chosen in the
autocomplete.
- S4: 355 results (1 104), same exact matches; S5: 248 (3 338), better
top results, 0.27 s instead of 1.3 s.
- Message « X exact result(s) out of N relevant result(s) for "…" », French
text added by materio_sapi_update_11001 (translations live in the DB).
- ScoreCutTest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
Each page of 15 results ran every query again (0.7 s for words, 1 s for a
phrase, up to 4 s). Base::rankedSearch() caches the ranking 10 min in the
materio_sapi bin, per user (results depend on node grants), invalidated by
node_list. Pages 2+ now take 1 ms, page 1 unchanged.
The OR query is not limited yet: tied to the tail cut of H6.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
- QueryEmbedder: vector of a search phrase cached 30 days (cache bin
materio_ai), model given search_timeout seconds (1 by default, new
setting, update 11001), left alone 60 s after a failure
(ModelPausedException, not logged).
- NeighbourSearch honours the enabled setting: the search called the model
even when materio_ai was switched off.
- materio_ai_cron() loads the model with the normal timeout: after a
restart, loading (2.9 s) exceeds the search delay and Ollama drops it,
so searches alone would never load it. Ultimate cron job exported.
- On any model failure the search answers with the keyword results only.
- QueryEmbedderTest: cache, delay, pause, cache during the pause, warm-up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
RankFusion::fuse(): exact matches (references, phrase, all words) first, in
their order; then the OR query and the kNN neighbours merged by reciprocal
rank fusion (k = 60, ranks only). Base::neighbours() asks materio_ai for 200
neighbours of the phrase without references; no model call for a chosen
term, references alone, a missing service, or an error (logged, keyword
results only). Unit test RankFusionTest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
referenceQuery() runs first: nodes whose field_reference is one of the
references of the phrase, uppercased (the field is case-sensitive: w0117 and
t0122 found nothing, B2), first and counted as exact. The reference condition
is removed from the OR query, where it restricted the results to the
referenced nodes (« bois R0208 » found nothing). References are removed from
the keywords; references alone run a single query (isReferenceSearch()).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
The OR query no longer sends the input raw (direct mode): « fibre de verre \ »
broke Solr, « -bois » returned every other node as exact, « verre~ » ran a
fuzzy search. KeywordText turns syntax between words into a separator, drops
leading + - ! and symbol-only words (« || » broke the payload boost). Hyphens
are split for the OR query only, as the direct mode did. Same counts and exact
matches on S4, about twice as fast.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
phraseQuery, andQuery and orQuery return [nid, uuid] lists built by
keywordQuery (duplicates removed by key, no more in_array over 10 000 rows);
filters code removed. KeywordText strips the stop words of the Solr field
type of the language, French elisions and request words: the custom types of
materio_sapi keep stop words (« de » alone matched 2 236 nodes). The phrase
and AND queries run for 6 meaningful words at most: beyond they find nothing
and the AND query could exceed maxClauseCount.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
parseRequest() no longer splits the input on commas (Tags::explode):
Base::cleanPhrase() collapses spaces and cuts at 150 characters. The phrase
is kept with its case for the model, lowercased in keys for the keyword
queries. The filters parameter of the assisted search is ignored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM