List Info

Thread: what do i get with FieldCache.DEFAULT.getStrings(...);




what do i get with FieldCache.DEFAULT.getStrings(...);
user name
2006-08-25 13:26:38
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-unsubscribelucene.apache.org
For additional commands, e-mail: java-user-helplucene.apache.org

what do i get with FieldCache.DEFAULT.getStrings(...);
user name
2006-08-25 14:26:51
Not sure of the solution though. But
FieldCache.DEFAULT.getStrings()
is returning a String[], with one String for each document.
Seems your
field is analyzed into multiple String values.

Chris Lu
-------------------------------------------------------
Lucene Search on Any Databases/Applications
http://www.dbsight.net

On 8/25/06, Martin Braun <mbraununi-hd.de> wrote:
> 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-unsubscribelucene.apache.org
> For additional commands, e-mail: java-user-helplucene.apache.org
>
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: java-user-unsubscribelucene.apache.org
For additional commands, e-mail: java-user-helplucene.apache.org

what do i get with FieldCache.DEFAULT.getStrings(...);
user name
2006-08-25 22:13:03
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 <mbraununi-hd.de>
: Reply-To: java-userlucene.apache.org, mbraununi-hd.de
: To: java-userlucene.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-unsubscribelucene.apache.org
: For additional commands, e-mail: java-user-helplucene.apache.org
:



-Hoss


------------------------------------------------------------
---------
To unsubscribe, e-mail: java-user-unsubscribelucene.apache.org
For additional commands, e-mail: java-user-helplucene.apache.org

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )