lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: what do i get with FieldCache.DEFAULT.getStrings(...);
Date Fri, 25 Aug 2006 22:13:03 GMT

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 <mbraun@uni-hd.de>
: Reply-To: java-user@lucene.apache.org, mbraun@uni-hd.de
: 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: java-user-unsubscribe@lucene.apache.org
: For additional commands, e-mail: java-user-help@lucene.apache.org
:



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message