LUCENE-3684: use UOE not IAE

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1232110 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-01-16 18:45:01 +00:00
parent dee0f7bd55
commit 297cc4a275
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ class PreFlexRWFieldsWriter extends FieldsConsumer {
public TermsConsumer addField(FieldInfo field) throws IOException {
assert field.number != -1;
if (field.indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0) {
throw new IllegalArgumentException("this codec cannot index offsets");
throw new UnsupportedOperationException("this codec cannot index offsets");
}
//System.out.println("w field=" + field.name + " storePayload=" + field.storePayloads + " number=" + field.number);
return new PreFlexTermsWriter(field);