Return-Path: X-Original-To: apmail-lucene-solr-commits-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 43E1EE1B6 for ; Fri, 23 Nov 2012 09:29:16 +0000 (UTC) Received: (qmail 96848 invoked by uid 500); 23 Nov 2012 09:29:16 -0000 Delivered-To: apmail-lucene-solr-commits-archive@lucene.apache.org Received: (qmail 96778 invoked by uid 500); 23 Nov 2012 09:29:15 -0000 Mailing-List: contact solr-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-commits@lucene.apache.org Received: (qmail 96717 invoked by uid 99); 23 Nov 2012 09:29:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Nov 2012 09:29:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Nov 2012 09:29:14 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 6164610B; Fri, 23 Nov 2012 09:28:54 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Fri, 23 Nov 2012 09:28:54 -0000 Message-ID: <20121123092854.82343.16377@eos.apache.org> Subject: =?utf-8?q?=5BSolr_Wiki=5D_Update_of_=22XMLResponseFormat=22_by_scottchu?= Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for chan= ge notification. The "XMLResponseFormat" page has been changed by scottchu: http://wiki.apache.org/solr/XMLResponseFormat?action=3Ddiff&rev1=3D14&rev2= =3D15 = The default behavior is not to indent. = - =3D=3D 'newline/line break character' =3D=3D + =3D=3D 'newline/line_break character' =3D=3D When your output contains newline character (Windows =3D CRLF, Linux=3DLF= , MAC=3DCR as far as we know), the xml output in browser won't show line br= eak effect. If you select 'view source', you can see there're indeed line b= reak, though, i.e. Solr doesn't affect stored data). For other writer types= , such as php, json, csv ,etc, they don't have this problem (json writer ty= pe even escapes newline). People normally read data from solr and show html= page, if this is your request, you can use regular expression to replace n= ewline with
tag, e.g. value.replaceWith("/\r\n/", "
").replaceWith(= "/(?!\r)\n/","
").replaceWith("/\r(?!\n)/","
"). Adapt the syntax to = the language you use before you execute this statement. = ----