Skip to content

fix(search): update ES query in order to boost contrib #7229 #7217#7246

Open
rmelisson wants to merge 1 commit intodevfrom
linked-contribs
Open

fix(search): update ES query in order to boost contrib #7229 #7217#7246
rmelisson wants to merge 1 commit intodevfrom
linked-contribs

Conversation

@rmelisson
Copy link
Copy Markdown
Contributor

No description provided.

@revu-bot revu-bot Bot requested a review from revu-bot April 21, 2026 15:06
@rmelisson rmelisson temporarily deployed to build-preproduction April 21, 2026 15:06 — with GitHub Actions Inactive
Copy link
Copy Markdown
Collaborator

@revu-bot revu-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary: ES Query Boost Adjustments for Contributions

This PR tweaks Elasticsearch boost values to surface contributions results higher in search rankings, and silently disables the prequalified-results path.

File Lines Severity Issue
service/search.ts 52–53 CRITICAL Prequalified results permanently disabled with dead code left in place
service/search.ts 65, 88–92 IMPORTANT Commented-out console.log debug statements committed to main
queries.ts 255–258 MINOR SOURCES.TOOLS boost removed without explanation; implicit default boost is opaque

Overall Assessment

The boost value changes themselves are straightforward tuning. The main concerns are the silent, permanent disabling of the prequalified-results feature (which leaves dead code and a misleading comment) and the committed debug console.log statements that should never reach production.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@tokenbureau
Copy link
Copy Markdown

tokenbureau Bot commented Apr 21, 2026

🎉 Deployment for commit 34a0f0a :

Ingresses
Docker images
  • 📦 docker pull harbor.fabrique.social.gouv.fr/cdtn/code-du-travail-numerique/app:sha-34a0f0ae8fb4894c09259f844c9ae6d300fa3cca
Debug

Comment on lines +90 to +93
// console.log(
// JSON.stringify(removeDuplicate(documents).slice(0, size), null, 2),
// elasticDocumentsIndex
// );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est-ce que ça vaut le coup de garder les commentaires dans le code pour logguer ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants