lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: New line
Date Wed, 20 Jul 2005 21:12:19 GMT
How you tokenize your input is up to you.  It sounds like you want a
custom Analyzer that has a tokenizer that knows about newline
characters and does whatever you need it to do when a newline character
is encountered (e.g. stop reading or whatever).  The search part of
Lucene has no notion of newline characters and such.  It only knows
about documents and words/tokens in them.

Otis


--- christopher may <fersher@hotmail.com> 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