Response output writers

As a last step, query results are returned to requestors in a given format. Solr communicates with clients using the HTTP protocol. Those clients are free to start the interaction by asking for one format or another, depending on their needs.

Although a default format can be set, the client can override it by means of the wt parameter. The value of the wt parameter is a mnemonic code associated with an available response writer.

There are several built-in response writers in Solr, which are described here:

ResponseWriter

Description

xml

The eXtensible Markup Language response writer. This is the default writer.

xslt

Combines the XML results with an XSLT file in order to produce custom XML documents.

json

JavaScript Object Notation response writer.

csv

Comma-Separated Value response writer.

velocity

This uses Apache Velocity to directly build web pages with query results. It is very useful for fast prototyping.

javabin

Java clients have a privileged way to obtain results from Solr using this response writer, which directly outputs Java Objects.

python, ruby, php

Specialized response writers for these languages that produce a structure directly tied to the language requirements.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.41.235