Mailing List Archive

Error while creating term
Can anybody help me?


When I uses the following code I am getting some
error

TermQuery theStringToFindQuery = new TermQuery(new Term
(null,stringToFind));


Error: java.lang.NullPointerException
**********
Stack trace:
File Line# Method Package
------------------------------------------------------------------------
Term.java 38 <init> com.lucene.index
Term.java 35 <init> com.lucene.index

What is the reason behind that?

Here I have given the entity name as null.
Do we can't create a Term with entityName as null



--------------------------------------------------------------
Robosoft Technologies, Mangalore, India



--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Error while creating term [ In reply to ]
I think it needs to be a field name (when you create a document it
has to be composed of at least one field).

Winton

Winton Davies
Lead Engineer, Overture (NSDQ: OVER)
1820 Gateway Drive, Suite 360
San Mateo, CA 94404
work: (650) 403-2259
cell: (650) 867-1598
http://www.overture.com/

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>