Changeset 1688
- Timestamp:
- Oct 5, 2010, 8:15:52 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/apps/frontend/modules/solr/actions/actions.class.php
r1687 r1688 73 73 $params = array('hl'=>'true', 'fl' => 'id,object_id,object_name,date,description', 'hl.fragsize'=>500, "facet"=>"true", "facet.field"=>array("object_name","tag"), "facet.date" => "date", "facet.date.start"=>"2007-05-01T00:00:00Z", "facet.date.end"=>"NOW", "facet.date.gap"=>"+1MONTH", 'fq' => $fq, "facet.date.include" => "edge"); 74 74 $this->sort_type = 'pertinence'; 75 76 if (!$this->query) { 77 $params['hl'] = 'false'; 78 } 75 79 76 80 $this->sort = $request->getParameter('sort'); … … 224 228 $this->results['docs'][$i]['highlighting'] = preg_replace('/^'."$this->results['docs'][$i]['personne']".'/', '', implode('...', $high_res)); 225 229 } 226 else $this->results['docs'][$i]['highlighting'] = $this->results['docs'][$i]['description']; 230 else { 231 $this->results['docs'][$i]['highlighting'] = $this->results['docs'][$i]['description']; 232 if (strlen($this->results['docs'][$i]['highlighting']) > 700) 233 $this->results['docs'][$i]['highlighting'] = preg_replace('/[^ ]*$/', '', substr($this->results['docs'][$i]['description'], 0, 700)).'...'; 234 } 227 235 } 228 236
Note: See TracChangeset
for help on using the changeset viewer.