lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject RangeQuery and getTerm
Date Tue, 28 Apr 2009 01:28:25 GMT
RangeQuery is based on two terms rather than one, and currently returns 
null from getTerm.

This can lead to less than obvious null pointer exceptions. I'd almost 
prefer to throw UnsupportedOperationException.

However, returning null allows you to still use getTerm on 
MultiTermQuery and do a null check in the RangeQuery case. Not sure how 
valuable that really is though.

Thoughts?

-- 
- Mark

http://www.lucidimagination.com




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


Mime
View raw message