Consideration of new fields in table searches

If you have created a new field in one of the SPIP tables, it will not be considered by default by the search functions. It must also be declared explicitly for that to occur.
The rechercher_liste_des_champs pipeline has what you need called from the ecrire/inc/rechercher.php file.

It accepts a parameter table listing table/field = coefficient couples, where the coefficient is a number specifying the number of points to assign for a successful search in that field on that table. The higher the coefficient, the more points that field will credit to a total score for any searches that match that field’s contents.


You have a field "town" in the SQL table "spip_articles" that you would like to include in searches - it must be declared as an additional field in the pipeline:

function pluginprefix_rechercher_liste_des_champs($tables){
	$tables['article']['town'] = 3;
	return $tables;

Author Mark Baber Published : Updated : 12/03/23

Translations : English, français, Nederlands