You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mike Aymard <mi...@hotmail.com> on 2009/12/16 07:34:02 UTC

Text formatting lost

Hi,

I'm a newbie and have a question about the text that is stored and then returned from a query. The field in question is of type "text", is indexed and stored. The original text included various blank lines (line feeds), but when the text field is returned as the result from a query, all of the blank lines and extra spaces have been removed. Since I am storing the content for the purpose of displaying, I need the original format to be preserved. Is this possible? I tried changing it to indexed="false" and using a copyvalue to copy it to the general text field for indexing, but this didn't help.

Thanks!
Mike
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141665/direct/01/

RE: Text formatting lost

Posted by Mike Aymard <mi...@hotmail.com>.
I am using the solr admin page.

Thanks for your help. I've got it working now!

Mike

> Date: Wed, 16 Dec 2009 09:08:33 -0800
> From: iorixxx@yahoo.com
> Subject: RE: Text formatting lost
> To: solr-user@lucene.apache.org
> 
> 
> > 
> > Thanks for the response. I am actually enclosing the text
> > with CDATA. Here's a sample of document that passing into
> > the update:
> > 
> > <add>
> > <doc>
> >   <field name="id">emailtest3</field>
> >   <field name="details"><![CDATA[
> >  
> 
> How are you querying solr? I mean what is your client? If you are using browser (solr admin page), xml response writer does not show multi blank lines and spaces. Try adding &wt=php to your query string. You would see your multi blank lines, spaces etc in your browser.
> 
> Hope this helps.
> 
> 
>       
 		 	   		  
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/171222986/direct/01/

RE: Text formatting lost

Posted by AHMET ARSLAN <io...@yahoo.com>.
> 
> Thanks for the response. I am actually enclosing the text
> with CDATA. Here's a sample of document that passing into
> the update:
> 
> <add>
> <doc>
>   <field name="id">emailtest3</field>
>   <field name="details"><![CDATA[
>  

How are you querying solr? I mean what is your client? If you are using browser (solr admin page), xml response writer does not show multi blank lines and spaces. Try adding &wt=php to your query string. You would see your multi blank lines, spaces etc in your browser.

Hope this helps.


      

RE: Text formatting lost

Posted by Mike Aymard <mi...@hotmail.com>.
Thanks for the response. I am actually enclosing the text with CDATA. Here's a sample of document that passing into the update:

<add>
<doc>
  <field name="id">emailtest3</field>
  <field name="details"><![CDATA[
 

Thanks a lot.

Thanks,
Jim Petersi

________________________________________
From: Jason Ravi 
To: Ran Morrison
Subject: RE: Need your Suggestion on how to add a URI in Tealeaf



]]></field>
  <field name="application">TEALEAF</field>
  <field name="environment">PROD</field>
  <field name="title">Need your Suggestion on how to add a URI in Tealeaf</field>
  <field name="issue">How do I add a URI to tealeaf</field>
  <field name="resolution">see details</field>
  <field name="submitter">Sharath Pasupunuti</field>
  <field name="dateSubmitted">2009-09-22T23:59:59Z</field>
  <field name="content_type">email</field>
</doc>


</add>

> From: erik.hatcher@gmail.com
> To: solr-user@lucene.apache.org
> Subject: Re: Text formatting lost
> Date: Wed, 16 Dec 2009 03:35:19 -0500
> 
> Maybe the XMLification of your text is adjusting the whitespace?   Try  
> enclosing your text with CDATA first.
> 
> 	Erik
> 
> On Dec 16, 2009, at 1:34 AM, Mike Aymard wrote:
> 
> >
> > Hi,
> >
> > I'm a newbie and have a question about the text that is stored and  
> > then returned from a query. The field in question is of type "text",  
> > is indexed and stored. The original text included various blank  
> > lines (line feeds), but when the text field is returned as the  
> > result from a query, all of the blank lines and extra spaces have  
> > been removed. Since I am storing the content for the purpose of  
> > displaying, I need the original format to be preserved. Is this  
> > possible? I tried changing it to indexed="false" and using a  
> > copyvalue to copy it to the general text field for indexing, but  
> > this didn't help.
> >
> > Thanks!
> > Mike
> > 		 	   		
> > _________________________________________________________________
> > Hotmail: Trusted email with powerful SPAM protection.
> > http://clk.atdmt.com/GBL/go/177141665/direct/01/
> 
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/

Re: Text formatting lost

Posted by Erik Hatcher <er...@gmail.com>.
Maybe the XMLification of your text is adjusting the whitespace?   Try  
enclosing your text with CDATA first.

	Erik

On Dec 16, 2009, at 1:34 AM, Mike Aymard wrote:

>
> Hi,
>
> I'm a newbie and have a question about the text that is stored and  
> then returned from a query. The field in question is of type "text",  
> is indexed and stored. The original text included various blank  
> lines (line feeds), but when the text field is returned as the  
> result from a query, all of the blank lines and extra spaces have  
> been removed. Since I am storing the content for the purpose of  
> displaying, I need the original format to be preserved. Is this  
> possible? I tried changing it to indexed="false" and using a  
> copyvalue to copy it to the general text field for indexing, but  
> this didn't help.
>
> Thanks!
> Mike
> 		 	   		
> _________________________________________________________________
> Hotmail: Trusted email with powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/177141665/direct/01/