Changeset 1412


Ignore:
Timestamp:
Sep 25, 2010, 9:02:00 PM (10 years ago)
Author:
roux
Message:

proposition changements index solr

Location:
cpc/trunk/project
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/bin/updateDB3.sh

    r1395 r1412  
    77#cat bin/updateDB3.model.sql | mysql $MYSQLID $DBNAME
    88php symfony doctrine:build --all --no-confirmation
    9 zcat data/sql/dumps/nosdeputes_prod.100912.sql.gz | mysql --default-character-set=utf8 $MYSQLID $DBNAME
     9
     10echo "ALTER TABLE `parlementaire` ADD `photo` LONGBLOB NULL AFTER `profession`;" | mysql $MYSQLID $DBNAME
     11
     12zcat data/sql/dumps/nosdeputes_prod.100925.sql.gz | mysql --default-character-set=utf8 $MYSQLID $DBNAME
     13
     14echo "ALTER TABLE `parlementaire` DROP `photo`;" | mysql $MYSQLID $DBNAME
    1015
    1116cat bin/updateDB3.1.sql | mysql $MYSQLID $DBNAME
     17
     18php symfony update:Deputes
    1219
    1320cd batch/hemicycle
     
    129136
    130137php symfony top:Deputes
    131 bash bin/update_tops
     138bash bin/update_tops.sh
    132139
    133140#bash bin/update_hardcache_all
  • cpc/trunk/project/config/doctrine/schema.yml

    r1407 r1412  
    163163    Timestampable: ~
    164164    Taggable: ~
     165    Solrable:
     166      title: [titre_complet]
     167      extra_weight: 1.3
     168      index_if: is_parent
     169      date: max_date
    165170  columns:
    166171    md5:
     
    237242    Timestampable: ~
    238243    Taggable: ~
    239     Solrable:
     244    Solrable:
     245      title: [titre]
    240246      description: [expose, texte, signataires]
    241247      moretags: [Parlementaires, sort]
     
    284290      description: [Parlementaire, question, ministere, reponse, themes]
    285291      moretags: [Parlementaire, ministere, motif_retrait, numero, themes]
    286       date: date
     292      date: last_date
    287293  columns:
    288294    source:
     
    334340      fields: [login]
    335341      unique: true
     342    Solrable:
     343      title: [login]
     344      extra_weight: 1.1
     345      description: [activite]
     346      moretags: [activite]
     347      index_if: is_active
    336348  columns:
    337349    login:
  • cpc/trunk/project/lib/model/doctrine/Parlementaire.class.php

    r1407 r1412  
    555555  }
    556556
    557   public function addVille($ville) {
    558     if (!isset($this->array_villes) || !$this->array_villes) {
    559       $villes = $this->getVille();
    560       $this->array_villes = explode(', ', $villes);
    561     }
    562     array_push($this->array_villes, $ville);
    563     return $this->_set('villes', implode(', ', $this->array_villes));
    564   }
    565 
    566   public function setVille($ville) {
    567     $this->array_villes = null;
    568     return parent::setVille($ville);
    569   }
    570 
    571557  public function getTop() {
    572558    //A supprimer lorsque les top seront unifiés (cf. parlementaire action)
  • cpc/trunk/project/lib/model/doctrine/QuestionEcrite.class.php

    r1385 r1412  
    2121    } else if (!$str) $str = "";
    2222    return $str;
     23  }
     24
     25  public function getLastDate() {
     26    if ($this->date_cloture)
     27      return $this->date_cloture;
     28    return $this->date;
    2329  }
    2430
  • cpc/trunk/project/lib/model/doctrine/Section.class.php

    r1333 r1412  
    7070  }
    7171
     72  public function isParent() {
     73    if ($this->section_id == $this->id && !preg_match('/questions/i', $this->titre))
     74      return true;
     75    return false;
     76  }
     77
    7278  public function getTitre() {
    7379    return ucfirst(preg_replace('/\s*\?$/', '', $this->_get('titre')));
Note: See TracChangeset for help on using the changeset viewer.