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 AndreHagenbruch: http://wiki.apache.org/solr/CSVResponseWriter?action=diff&rev1=3&rev2=4 == 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. - 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 [[http://wiki.apache.org/solr/UpdateCSV|CSV update format]]. - Multi-valued fields are also supported, and the output of this CSV format is compatible with - Solr's [[http://wiki.apache.org/solr/UpdateCSV|CSV update format]]. == Example == Add {{{wt=csv}}} to any query that returns a list of documents. @@ -20, +18 @@ 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. + * {{{csv.null}}} - Defaults to a zero length string. This is used when a document has no value for a particular field. - {{{csv.mv}}} 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=| + {{{csv.mv}}} 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=| + * {{{csv.mv.encapsulator}}} - Defaults to none * {{{csv.mv.escape}}} - Defaults to \ * {{{csv.mv.separator}}} - Defaults to csv.separator
