java-dev@lucene.apache.org
[Top] [All Lists]

Re: [jira] Field constructor, avoiding String.intern()

Subject: Re: [jira] Field constructor, avoiding String.intern()
From: Chris Hostetter
Date: Fri, 23 Feb 2007 14:45:39 -0800 PST
: Accessing documents from a hit-collector is not advised.  It is
: generally best to compose queries and filters to reduce the number of
: matches.  When that's not feasible, a hit collector that uses a
: FieldCache to filter by or collect field values is much faster than
: accessing documents.

i make no judgements about the merits of intern(), but i would like to
reiterate Doug's point (if you are using the Document class in a
HitCollector you are probably dong something wrong) and make a suggestion:

*If* people agree that interning field names makes sense when
indexing Documents, but does not make sense when dealing when reading
Documents out of an IndexReader/IndexSearche then this sounds like yet
another justification for seperating the implimentations of those use
cases...

https://issues.apache.org/jira/browse/LUCENE-778#action_12475526

...having an "option" when Documents/Fields are constructed to determine
wether intern is called seems .... odd.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-dev-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>