Access solr attributes directly in result template?

Author Message

Daniel Staver

Tuesday 22 March 2011 10:53:28 am

Hi! Is it possible to access solr attributes directly in an eZfind result template?

I've indexed some data from an external database (related to the content objects by remote ID), so the data doesn't exist in the eZ content object.

Otherwise I'll have to do a mysql query to the external database for each result item to access the data.

Daniel Staver
http://daniel.staver.no

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 04:57:30
Script start
Timing: Jan 18 2025 04:57:30
Module start 'layout'
Timing: Jan 18 2025 04:57:30
Module start 'content'
Timing: Jan 18 2025 04:57:30
Module end 'content'
Timing: Jan 18 2025 04:57:30
Script end

Main resources:

Total runtime0.5047 sec
Peak memory usage4,096.0000 KB
Database Queries48

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.1875152.6563
Module start 'layout' 0.00600.0033 740.843839.5156
Module start 'content' 0.00930.4938 780.3594463.4609
Module end 'content' 0.50300.0016 1,243.82038.1016
Script end 0.5046  1,251.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.6916160.0002
Check MTime0.00140.2759160.0001
Mysql Total
Database connection0.00060.120510.0006
Mysqli_queries0.463391.8015480.0097
Looping result0.00060.1191460.0000
Template Total0.470093.120.2350
Template load0.00220.427620.0011
Template processing0.467892.700420.2339
Template load and register function0.00010.028910.0001
states
state_id_array0.00080.148810.0008
state_identifier_array0.00100.197620.0005
Override
Cache load0.00170.342270.0002
Sytem overhead
Fetch class attribute can translate value0.00100.205710.0010
Fetch class attribute name0.00080.154420.0004
XML
Image XML parsing0.00180.351310.0018
class_abstraction
Instantiating content class attribute0.00000.000920.0000
General
dbfile0.00280.5515160.0002
String conversion0.00000.001640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 5
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs