Coding with SPIP 3.0
SPIP3.0 Technical Documentation

> > > > rechercher_liste_des_jointures

rechercher_liste_des_jointures

This pipeline, used in ecrire/inc/rechercher.php, is used to declare the searches that should be executed on other tables rather than the table explicitly referenced in a loop.
For example, a search for an author name for an ARTICLES loop returns the articles that this author has written (by searching in the spip_auteurs_articles table).

This pipeline receives an array of tables containing an array of table, field, weighting triplets (like the pipeline "rechercher_liste_des_champs").

Example

Some modifications for the spip_articles table:

  1. function pluginPrefix_rechercher_liste_des_jointures($tables){
  2.  
  3. // search in the BIO field of authors when we search in the articles
  4. $tables['article']['auteur']['bio'] = 2;
  5.  
  6. // search in the text of the keywords
  7. $tables['article']['mot']['texte'] = 2;
  8.  
  9. // do not search in the documents
  10. unset($tables['article']['document']);
  11.  
  12. return $tables;
  13. }

Download

In SPIP, this pipeline is used to search for elements using their linked keywords or authors