Commit Graph
69 Commits
Author SHA1 Message Date
bachirandClaude Opus 5.5 1e882d5bda Search texts and states, help tooltip, wider field (F4)
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
2026-11-23 16:44:28 +01:00
bachirandClaude Opus 5.5 fca4be3155 Remove the former search form, filters and SlimSelect (F2)
- 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
2026-11-17 21:11:18 +01:00
bachirandClaude Opus 5.5 7786c2cf71 materio_sapi: neighbours cut relative to the search, OR query as fallback (H6)
- 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
2026-11-17 19:56:53 +01:00
bachirandClaude Opus 5.5 88ecfb7199 materio_sapi: ranking cached for the next pages (H9)
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
2026-11-17 19:10:10 +01:00
bachirandClaude Opus 5.5 6d8c64c94f materio_ai: cached search vectors, 1 s delay, pause and cron warm-up (H8)
- 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
2026-11-17 18:26:19 +01:00
bachirandClaude Opus 5.5 a656427aec materio_sapi: RankFusionTest as a Drupal UnitTestCase with PHPUnit attributes (T1)
Runs with vendor/bin/phpunit -c web/core: 6 tests, 8 assertions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
2026-11-17 12:57:42 +01:00
bachirandClaude Opus 5.5 797a5714f1 materio_sapi: hybrid search, keyword and kNN results merged by RRF (H5)
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
2026-11-17 12:43:04 +01:00
bachirandClaude Opus 5.5 8229a80c57 materio_sapi: references as exact matches, any case (H4)
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
2026-11-17 12:17:09 +01:00
bachirandClaude Opus 5.5 58ce1b0513 materio_sapi: OR query in terms mode, Solr syntax neutralized (H3)
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
2026-11-17 12:10:00 +01:00
bachirandClaude Opus 5.5 ae69b5c03b materio_sapi: split sapiQuery, stop words removed, short-input exact queries (H2)
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
2026-11-17 11:53:13 +01:00
bachirandClaude Opus 5.5 7db02c8b30 materio_sapi: search keys kept as one phrase, filters ignored (H1)
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
2026-11-17 11:30:32 +01:00
bachir c38d01ee2b massive custom modules and themes D11 compatibility 2026-09-23 14:16:41 +02:00
bachir 48c31420a7 search results in changed order #3584 2026-09-09 16:02:39 +02:00
bachir ee271ab4d8 upgraded all cutom modules, themes & profile following upgrade-status 2024-08-20 19:47:47 +02:00
bachir 38501ecf4d updated custom modules version flag, installed drupal/core-dev and rector 2024-08-20 19:09:09 +02:00
bachir 7b22d7d9e7 deprecated warning fix 2023-06-20 21:03:45 +02:00
bachir 1565ce8aa2 #1906 fixed search multi keys (ajax query params miswrited qs.stringify arrayFormat) 2022-09-13 12:29:38 +02:00
bachir 40b7e75d44 #1906, click on header menu base reset search 2022-09-13 11:26:34 +02:00
bachir f919dab0e9 #1661 added phrase query before and then or querys of solr search 2022-08-15 17:54:32 +02:00
bachir 1c47278ae5 fix #1816 solr too many boolean clauses 2022-08-15 17:30:59 +02:00
bachir db6a82f7f7 1906 FIX search form autocomplete multi terms 2022-08-15 16:57:57 +02:00
bachir 1993f80d8d #1791 removed terms thesaurus without parents from search form autocomplete 2022-08-12 19:05:17 +02:00
bachir d1b4902aa3 #1906 serach form autocmplete multi terms 2022-08-12 17:00:49 +02:00
bachir 1f07e66fe6 upgraded core, fixed customs modules 2022-02-15 11:22:01 +01:00
bachir 9f1e3c4f76 fixed filters in search 2021-10-27 18:01:57 +02:00
bachir 20fea9dce1 better search with filters 2021-10-27 15:51:14 +02:00
bachir c5fe8c0c92 populating search form filters value from url query params 2021-10-27 15:45:21 +02:00
bachir fa0c70ccd8 modified custom solr field types, fixed the reference search 2021-10-27 00:20:07 +02:00
bachir dc2b536be3 improved search results infos with count exact match 2021-10-26 21:49:44 +02:00
bachir 60c4cf5451 refactoring of materio_sapi search queries: 1 query hyper-restrictive followed by one more opened 2021-10-26 21:33:24 +02:00
bachir 87644424a2 search_api solr config for lait vs laiton #1568 2021-10-25 16:48:54 +02:00
bachir 1e345cd515 extended earch form text field to maxlength 150 2021-10-12 09:46:49 +02:00
bachir 14f2e4a9aa added country name to sapi index 2021-10-11 21:35:29 +02:00
bachir 7056bce803 added thesaurus ordered in sapi solr database index 2021-10-08 13:39:17 +02:00
bachir aca756e64d search api autocomplete withour accent, and splitting numbers (fruhstuck40) 2021-10-07 22:44:32 +02:00
bachir cdce298444 reverted sapi conditiongroup OR instead of AND 2021-08-26 00:02:15 +02:00
bachir 4d05961269 sapi conditiongroup AND instead of OR 2021-08-25 22:52:41 +02:00
bachir 57d042e5d8 sapi conditiongroup AND instead of OR 2021-08-25 22:07:16 +02:00
bachir ed071a0472 default base page sort contents by created date 2021-08-24 23:46:44 +02:00
bachir a123f9ad15 renamed assisted research to filters 2021-08-05 23:03:06 +02:00
bachir f9a353a32b fixed the sapi_solr search autocompletewith synonyms 2021-07-28 22:11:46 +02:00
bachir 81f47c4300 fix search autocomplete duplicates 2021-05-20 20:19:42 +02:00
bachir 43a8daff8a translated terms in assisted search 2021-05-20 20:12:41 +02:00
bachir 90883384f4 added field_weight to assisted research terms for sorting 2021-05-20 19:45:21 +02:00
bachir a36c19b21a toggle search filers display 2021-05-19 18:21:29 +02:00
bachir 8008217444 search filters ok, to be improved on results pertinance 2021-04-05 12:45:58 +02:00
bachir 1851c84ea5 started advanced search 2021-04-01 22:44:44 +02:00
bachir 651315c319 restrict base search and default base to current language 2021-03-05 21:32:59 +01:00
bachir 6485e3e27b fixed thematiques display 2021-03-03 17:55:32 +01:00
bachir 8fd57d2579 tried to boost sapi query with termid, do not work 2021-03-03 11:32:23 +01:00