Changeset 1444


Ignore:
Timestamp:
Sep 26, 2010, 11:06:10 PM (10 years ago)
Author:
teymour
Message:

On ne montre pas les dans le résultat de la recherche
+ modif de schema de classe
+ Vire dbug

Location:
cpc/trunk/project
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/apps/frontend/modules/solr/actions/actions.class.php

    r1438 r1444  
    2727    case 'Commentaire':
    2828      return url_for('@photo_citoyen?slug='.$obj->getCitoyen()->getSlug());
     29    case 'Citoyen':
     30      return url_for('@photo_citoyen?slug='.$obj->getSlug());
    2931    }
    3032  }
     
    117119      $this->results['docs'][$i]['titre'] = $obj->getTitre();
    118120      $this->results['docs'][$i]['personne'] = $obj->getPersonne();
    119       if (isset($results['highlighting'][$res['id']]['text']))
    120         $this->results['docs'][$i]['highlighting'] = preg_replace('/^'."$this->results['docs'][$i]['personne']".'/', '', implode('...', $results['highlighting'][$res['id']]['text']));
    121       else
     121      if (isset($results['highlighting'][$res['id']]['text'])) {
     122        $high_res = array();
     123        foreach($results['highlighting'][$res['id']]['text'] as $h) {
     124          if (!preg_match('/=/', $h))
     125            array_push($high_res, $h);
     126        }
     127        $this->results['docs'][$i]['highlighting'] = preg_replace('/^'."$this->results['docs'][$i]['personne']".'/', '', implode('...', $high_res));
     128      }else
    122129        $this->results['docs'][$i]['highlighting'] = '';
    123130    }
  • cpc/trunk/project/config/doctrine/schema.yml

    r1441 r1444  
    276276      foreignAlias: Amendements
    277277    Texteloi:
    278       foreignAlias: Texteloi
     278      foreignAlias: Amendements
    279279  inheritance:
    280280    extends: ObjectCommentable
     
    294294    Solrable:
    295295      description: [Parlementaire, question, ministere, reponse, themes]
    296       moretags: [Parlementaire, ministere, motif_retrait, numero, themes]
     296      moretags: [Parlementaire, ministere, motif_retrait, themes]
    297297      date: last_date
    298298  columns:
     
    526526      foreignAlias: Articles
    527527    Texteloi:
    528       foreignAlias: Texteloi
     528      foreignAlias: ArticleLois
    529529  inheritance:
    530530    extends: ObjectCommentable
     
    552552      foreignAlias: Alineas
    553553    Texteloi:
    554       foreignAlias: Texteloi
     554      foreignAlias: Alineas
    555555  inheritance:
    556556    extends: ObjectCommentable
     
    588588      foreignAlias: SousSections
    589589    Texteloi:
    590       foreignAlias: Texteloi
     590      foreignAlias: TitreLois
    591591
    592592Texteloi:
  • cpc/trunk/project/lib/task/indexSolrTask.class.php

    r1364 r1444  
    4444    }
    4545
    46     foreach(array("Parlementaire", "Commentaire", "QuestionEcrite", "Amendement", "Intervention") as $table) {
     46    foreach(array("Citoyen", "Organisme", "Section", "Parlementaire", "Commentaire", "QuestionEcrite", "Amendement", "Intervention") as $table) {
    4747      while (1) {
    4848        $q = Doctrine::getTable($table)
  • cpc/trunk/project/lib/task/sendAlertTask.class.php

    r1440 r1444  
    2828      $results = $solr->search($query, array('sort' => 'date desc', 'hl' => 'yes', 'hl.fragsize'=>500));
    2929      $alerte->next_mail = date('Y-m-d H:i:s', time() + self::$period[$alerte->period]);
    30       echo $alerte->next_mail." $query\n";
    3130      if (! $results['response']['numFound']) {
    3231        $alerte->save();
Note: See TracChangeset for help on using the changeset viewer.