lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lavin <lav...@cs.tcd.ie>
Subject Re: WeakReference Returning NULL
Date Tue, 12 Mar 2013 19:04:48 GMT

Please ignore this, I was using two different indexes, one of which did 
not have TermVectors.YES set,

apologies,

Peter


On 03/12/2013 05:49 PM, Peter Lavin wrote:
>
>
> Hi all, I'm looking to create a TermFreqVector as follows
>
>
> TermFreqVector[] tfvs = null;
> try {
> tfvs = indxRead.getTermFreqVectors(docId);
> } catch (IOException e) {
> e.printStackTrace();
> }
>
> However, the object tfvs is returning null.
>
> I've debugged it to a class called CloseableThreadLocal to this method...
>
>
> public T get() {
> WeakReference<T> weakRef = t.get();
> if (weakRef == null) {
> T iv = initialValue();
> if (iv != null) {
> set(iv);
> return iv;
> } else
> return null;
> } else {
> return weakRef.get();
> }
> }
>
>
> where weakRef is returning null.
>
> Can anyone shed some light on why this would be happening?
>
> I'm using the code in a webservice container
>
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

-- 
with best regards,
Peter Lavin,
PhD Candidate,
CAG - Computer Architecture & Grid Research Group,
Lloyd Institute, 005,
Trinity College Dublin, Ireland.
+353 1 8961536

---------------------------------------------------------------------
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