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 <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • Re: New line [EMAIL PROTECTED]

Reply via email to