Changeset 1319


Ignore:
Timestamp:
Sep 5, 2010, 1:58:20 AM (10 years ago)
Author:
teymour
Message:

Indexation des commentaires
+ amélioration de la tache d'indexation

Location:
cpc/trunk/project/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/lib/model/doctrine/Citoyen.class.php

    r878 r1319  
    66class Citoyen extends BaseCitoyen
    77{
     8  public function __toString() {
     9    return $this->getLogin();
     10  }
     11
    812  public function isPasswordCorrect($password) {
    913    return ($this->password == sha1($password));
  • cpc/trunk/project/lib/model/doctrine/Commentaire.class.php

    r1140 r1319  
    66class Commentaire extends BaseCommentaire
    77{
     8  public function getTitre() {
     9    return $this->getPresentation();
     10  }
     11
    812  public function __toString() {
    913    $str = substr($this->commentaire, 0, 250);
  • cpc/trunk/project/lib/model/solr/SolrCommands.class.php

    r1316 r1319  
    2222      self::$file = fopen(self::getFileCommands(), 'w');
    2323    }
    24     $str = $status.' : '.json_encode($json);
     24    $str = $status.' : '.json_encode($json)."\n";
    2525    fwrite(self::$file, $str, strlen($str));
    2626    sem_release(self::getSemaphore());
  • cpc/trunk/project/lib/task/indexSolrTask.class.php

    r1274 r1319  
    3434    $solr = new SolrConnector();
    3535
     36    $solr->deleteAll();
    3637
    37     foreach(array("Parlementaire", "QuestionEcrite", "Amendement", "Intervention") as $table) {
     38    foreach(array("Parlementaire", "Commentaire", "QuestionEcrite", "Amendement", "Intervention") as $table) {
    3839      while (1) {
    3940        $q = Doctrine::getTable($table)
     
    5455          $this->state[$table] = $o->id;
    5556        }
     57        $solr->updateFromCommands();
    5658        $this->writeState();
    5759      }
    5860    }
     61    unlink($this->file_conf);
    5962  }
     63 
    6064}
Note: See TracChangeset for help on using the changeset viewer.