11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

v.layout.enabled<br />

v.contentType<br />

v.json<br />

Determines if the main template should have<br />

a layout wrapped around it. True by default,<br />

but requires v.layout to specified as well.<br />

Specifies the content type used in the HTTP<br />

response. If not specified, the default will<br />

depend on whether v.json is specified or<br />

not.<br />

Specifies a function name to wrap around the<br />

response rendered as JSON. If specified, the<br />

content type used in the response will be<br />

"application/json;charset=UTF-8", unless<br />

overridden by v.contentType.<br />

Output will be in this format (with v.json=wrf):<br />

wrf("result":"")<br />

true<br />

without json.wrf:<br />

text/html;charset=UTF-8<br />

with json.wrf:<br />

application/json;charset=UTF-8<br />

v.locale Locale to use with the $resource tool and<br />

other LocaleConfig implementing tools. The<br />

default locale is Locale.ROOT. Localized<br />

resources are loaded from standard Java<br />

resource bundles named resources[_loca<br />

le-code].properties. Resource bundles<br />

can be added by providing a JAR file visible<br />

by the <strong>Solr</strong>ResourceLoader with resource<br />

bundles under a velocity sub-directory.<br />

Resource bundles are not loadable under<br />

conf/, as only the class loader aspect of<br />

<strong>Solr</strong>ResourceLoader can be used here.<br />

v.template.<br />

When the "params" resource loader is<br />

enabled, templates can be specified as part<br />

of the <strong>Solr</strong> request.<br />

VelocityResponseWriter context objects<br />

Context<br />

reference<br />

Description<br />

request<br />

<strong>Solr</strong>QueryRequest javadocs<br />

response QueryResponse most of the time, but in some cases where QueryResponse doesn't like the<br />

request handlers output ( AnalysisRequestHandler, for example, causes a ClassCastException<br />

parsing "response"), the response will be a <strong>Solr</strong>ResponseBase object.<br />

esc A Velocity EscapeTool instance<br />

date A Velocity ComparisonDateTool instance<br />

list A Velocity ListTool instance<br />

math A Velocity MathTool instance<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

399

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!