lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xing@mac.com" <x...@mac.com>
Subject Re: New line
Date Wed, 20 Jul 2005 21:01:29 GMT
Chris,

If I understand your question correctly, you are saying why is the the 
search output of lucene not returning the two lines as distinct two lines?

If you are returning the lucene search output to the web and want the 
new line \n to be dispalyed as such, you need to replace the character 
with [br] tags.

To lucene, the new line is likely used as part of the tokenizer to 
distinguish words/tokens for the index but it does not do anything 
special with it is stored or displayed. However, depending on your 
lucene client/app, you might need to tweak the client output to display 
the 2 lines separately.

I think that is your question.

Xing



christopher may wrote:
> 
> When my text file is being searched it seems every line is  blending. So 
> I need the index searcher to see a newline character or field separator 
> in the text file. What can be used in the text file to separate my lines ?
> 
>> From: Otis Gospodnetic <otis_gospodnetic@yahoo.com>
>> Reply-To: java-user@lucene.apache.org
>> To: java-user@lucene.apache.org
>> Subject: Re: New line
>> Date: Tue, 19 Jul 2005 10:15:15 -0700 (PDT)
>>
>> I may be misunderstanding you, but \n is the "newline" character.
>> http://www.google.com/search?q=newline%20character%20java
>>
>> Otis
>>
>>
>> --- christopher may <fersher@hotmail.com> wrote:
>>
>> >
>> > I am using text files in my index. What can be used as the new line
>> > character ? Say I have
>> > A batch of apples <Title> Apples . So the doc is returned as Apples
>> > and the
>> > summary is A batch of apples. If I want to then on the next line of
>> > the file
>> > put A state out west <Title>Arizona. This all blends together. What
>> > is my
>> > default line separator ? Or new line character. Thanks all
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> > For additional commands, e-mail: java-user-help@lucene.apache.org
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message