annuaire-entreprises-data-gouv-fr / search-api

MIT License
16 stars 2 forks source link

[PARAMETERS]feat: add sort_by_size param to request #379

Closed HAEKADI closed 4 months ago

HAEKADI commented 4 months ago

Closes #340

A new search option has been added, introducing changes to the search algorithm that prioritize larger companies in the search results.

The field used to weight the search results is facteur_taille_entreprise, calculated as the product of two fields: code_categorie_entreprise and nombre_etablissements_ouverts.

To emphasize larger companies, a new parameter, sort_by_size, has been introduced. This parameter accepts a boolean value of True or False.

HAEKADI commented 4 months ago

@XavierJp FYI, I ended up including the dirigeants and elus fields in text the search with minor weighting to ensure they do not dominate the search results.