On 4/24/2009 3:16 AM, Doron Cohen wrote: > On Fri, Apr 24, 2009 at 12:28 AM, Steven Bethard <beth...@stanford.edu>wrote: > >> On 4/23/2009 2:08 PM, Marcus Herou wrote: >>> But perhaps one could use a FieldCache somehow ? >> Some code snippets that may help. I add the PageRank value as a field of >> the documents I index with Lucene like this: >> >> Document document = new Document(); >> double pageRank = this.pageRanks.getCount(article.getId()); >> document.add(new Field( >> PAGE_RANK_FIELD_NAME, Float.toString((float)pageRank), >> Field.Store.YES, Field.Index.NOT_ANALYZED)); > > > Note that there's no need to store this field - it is the indexed > value which is being used.
Thanks, that's good to know. I debated this for a while, but couldn't tell for certain from the documentation. Steve --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org