lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Update of "CSVResponseWriter" by YonikSeeley
Date Thu, 29 Jul 2010 15:09:31 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "CSVResponseWriter" page has been changed by YonikSeeley.


New page:
== CSV output format ==
<!> [[Solr3.1]]

The CSVResponseWriter can write the list of documents in a response in CSV format.
Other information that would normally be included in a response, such as facet information,
is excluded.

Multi-valued fields are also supported, and the output of this CSV format is compatible with
Solr's [[|CSV update format]].

== Example ==
Add {{{wt=csv}}} to any query that returns a list of documents.


IW-02,"electronics,connector",iPod & iPod Mini USB 2.0 Cable,1,11.5,0.98867977
F8V7067-APL-KIT,"electronics,connector",Belkin Mobile Power Cord for iPod w/ Dock,1,19.95,0.6523595
MA147LL/A,"electronics,music",Apple 60 GB iPod with Video Playback Black,10,399.0,0.2446348

== Parameters ==
There are multiple parameters to control exactly what type of CSV is returned.
 * {{{csv.encapsulator}}} - Defaults to "
 * {{{csv.escape}}} - Defaults to none
 * {{{csv.separator}}} - Defaults to ,
 * {{{csv.header}}} - Defaults to true. If false, we skip printing out the column headers
 * {{{csv.newline}}} - Defaults to \n
 * {{{csv.null}}} - Defaults to a zero length string.  This is used when a document as no
value for a particular field.

{{{}}} params are the defaults for how multi-valued fields are encoded.
per-field overrides for these values can be done via f.myfield.csv.separator=|
 * {{{}}} - Defaults to none
 * {{{}}} - Defaults to \
 * {{{}}} - Defaults to csv.separator

View raw message