Thanks for your reply. Actually I didn't mean to get the original
contents from the index, what I want is to get the index of the contents
(maybe in the type of Reader) so that after I put it back with the new
title, I can do the search on contents.
You guys really have done a great job!!
Xiaozheng
> I indexed the file by title and contents such as:
> document.add(Field.Text("title", file.getTitle()));
> document.add(Field.Text("contents", file.getTextContents()));
> //the getTextContents() return the Reader type obj
>
> so far so good. I was able to search on both title and contents.
>
> Now since the title changed, I need to update the index(the contents
> never change). Instead of calling file.getTextContents() again, I
> figure
> that it maybe faster if I can get the reader (of contents field) back
> from the search hits(the original file could be huge).
You're out of luck here. Field.Text(String, Reader) is an unstored
field, so the contents are not in the index.
There is one trick - you can access the terms that came from the
analysis process over that text, but it is very unlikely to be the
original contents. See how Luke does this if you need to go to that
extreme.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]