dnaber 2004/11/23 11:48:55 Modified: src/test/org/apache/lucene/search BaseTestRangeFilter.java Log: adding license; use the non-deprecated Field constructors Revision Changes Path 1.2 +18 -3 jakarta-lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java Index: BaseTestRangeFilter.java =================================================================== RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- BaseTestRangeFilter.java 23 Nov 2004 14:17:18 -0000 1.1 +++ BaseTestRangeFilter.java 23 Nov 2004 19:48:55 -0000 1.2 @@ -1,5 +1,20 @@ package org.apache.lucene.search;
+/** + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import java.util.Random; @@ -64,7 +79,7 @@ for (int d = minId; d <= maxId; d++) { Document doc = new Document(); - doc.add(Field.Keyword("id",pad(d))); + doc.add(new Field("id",pad(d), Field.Store.YES, Field.Index.UN_TOKENIZED)); int r= rand.nextInt(); if (maxR < r) { maxR = r; @@ -72,8 +87,8 @@ if (r < minR) { minR = r; } - doc.add(Field.Keyword("rand",pad(r))); - doc.add(Field.Keyword("body","body")); + doc.add(new Field("rand",pad(r), Field.Store.YES, Field.Index.UN_TOKENIZED)); + doc.add(new Field("body","body", Field.Store.YES, Field.Index.UN_TOKENIZED)); writer.addDocument(doc); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]