You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Chen Li <ch...@ebi.ac.uk> on 2007/04/10 17:58:19 UTC
index the whole plain text file's content
Hello,
I used demo code(IndexFiles.java) from lucene to index around 100 text
files.
doc.add(new Field("contents", new FileReader(f)));
Which is interesting that, for some larger files (around 500kb), only
the query term on the top of the file is searchable, once the term is at
the end or after an unknown point of the file, I couldn't use
SearchFiles.java, which also came with demo code, to find it.
I even tried to convert the file to String and index it as Store.YES.
But no luck, still same resultset was returned.
Does anybody have same experience to share the solution with me? I would
so appreciate.
Cheers,
Chen
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: index the whole plain text file's content
Posted by karl wettin <ka...@gmail.com>.
10 apr 2007 kl. 17.58 skrev Chen Li:
> Which is interesting that, for some larger files (around 500kb),
> only the query term on the top of the file is searchable, once the
> term is at the end or after an unknown point of the file, I
> couldn't use SearchFiles.java, which also came with demo code, to
> find it.
>
> I even tried to convert the file to String and index it as
> Store.YES. But no luck, still same resultset was returned.
>
> Does anybody have same experience to share the solution with me? I
> would so appreciate.
Could it perhaps be this:
<http://lucene.apache.org/java/docs/api/org/apache/lucene/index/
IndexWriter.html#setMaxFieldLength(int)>
?
--
karl
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org