FieldCache was designed with searching in mind, where there can only be a single indexed Term for each doc (otherwise how would you sort a doc that had two Terms "a" and "z" ?) I'm acctually suprised you are getting any values out instead of an Exception
If you index your Field as UN_TOKENIZED you should get the resultss you expect -- but then searching on individual words may not work the way you expect, adding the data to two differnet fields (on TOKENIZED for search and one UN_TOKENIZED for sorting/FieldCache) is the typicaly solution. You also may want to look at hte LazyFieldLoading using the Fieldable APIs .... they are for accessing the STORED fields of a Document, and are aparently much faster then the old method of pulling out the whole Document ... wether they are as fast as FieldCache or not I don't know. : Date: Fri, 25 Aug 2006 15:26:38 +0200 : From: Martin Braun <[EMAIL PROTECTED]> : Reply-To: java-user@lucene.apache.org, [EMAIL PROTECTED] : To: java-user@lucene.apache.org : Subject: what do i get with FieldCache.DEFAULT.getStrings(...); : : hello, : I am using FieldCache.DEFAULT.getStrings in combination with an own : HitCollector (I loop through all results and count the number of : occurences of a fieldvalue in the results). : : My Problem is that I have Filed values like dt.|lat or ger.|eng. an it : seems that only the last token of the fields value is stored in the : returned array of FieldCache.DEFAULT.getStrings(is.getIndexReader(), : category). : : But both values are Stored in the Index (I can find dt. and lat.) : : The same issue is with another field which contains the word cd-rom an I : get only "rom" back. : : Is this an Analyzer Problem? How do I get all tokens? : : : : tia, : martin : : : : : --------------------------------------------------------------------- : To unsubscribe, e-mail: [EMAIL PROTECTED] : For additional commands, e-mail: [EMAIL PROTECTED] : -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]