- Base.vue: the browser tab shows the phrase searched (vue-meta), « Base »
without a search.
- terms of an old or edited URL parsed without throwing: malformed JSON
is ignored.
- Production build.
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
- SearchForm.vue: one search field (150 characters, like the backend) and
a button; Enter and button submit the same way; route base with keys
only (no more terms nor filters). Same ids and classes as the former
Drupal form, so main.scss applies.
- SearchBlock.vue: no more fetching nor Vue.compile of the Drupal form.
- Base.vue: aria-live on the result message, announced by screen readers.
- Production build (npm run prod).
Suggestions in the field come back in F7 (they came from the jQuery UI
autocomplete of the Drupal form).
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
NeighbourSearch::search() embeds a phrase and runs a Search API query on the
database index, tagged materio_ai_knn. KnnQuerySubscriber turns only this
query into {!knn f=knn1024_vector topK=N}: Search API filter queries
(content_access, language, index) stay as kNN pre-filters (Solr 9.1+), and
keyword queries are untouched. Sent in POST by http_method AUTO.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
Vectorizer::vectorize() calls trackItemsUpdated for each translation whose
vector was saved or deleted, also when the model fails half-way. With
index_directly the cron indexes them at the end of the request. drush mai-va
only marks them (batch tracking) and reminds to run drush sapi-i.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
SolrDocumentSubscriber listens to PostCreateIndexDocumentsEvent and sets
knn1024_vector on each node document from the materio_ai_embedding table
(EmbeddingStorage::loadVectors, one query per batch, active model only).
No call to the model: a full reindex does not depend on Ollama.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
SolrConfigSubscriber listens to PostConfigFilesGenerationEvent (search_api_solr
4.x no longer calls hook_search_api_solr_config_files_alter) and appends the
knn_vector_1024 DenseVectorField (cosine, HNSW) and the knn1024_* dynamic field
(not stored). Solr 9.1 at least. Dependency on search_api_solr added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM