No subject


Wed Dec 19 13:16:59 PST 2007


wanted to do post sorting on some of the fields. Lucene's
Searcher.search(Query q, Sort s) is really fast and the sorter has
access to non-tokenized fields without creating the Documents (even
non-stored ones). This requires storing the mtime as an integer or
long though.

Also assuming that you don't have more than a few stored fields it
should still be fairly fast to create the Documents via Hits.doc(int
i) since it only adds the stored fields to the doc.

One hack we use at work is to encode the needed field data in one
stored field and then parse that blob for each hit and using the data
for display.

> > Yes pulling entire Lucene Documents of the disc is a pain. But you
> > need a really, really, good reason to use Lucene like that.
>
> Well, you have to pull Documents sooner or later.  It's what has all
> of your fields, and that's where we store our metadata.

What does "pull" mean exactly in the case in point? Just calling
Hits.doc(i) or is it a full rebuilding of the Document as it was added
to the index? I guess I've read it as more than doing a Hits.doc() at
least...


Cheers,
Mikkel


More information about the Xesam mailing list