01: package org.apache.lucene.index;
02:
03: /**
04: * Licensed to the Apache Software Foundation (ASF) under one or more
05: * contributor license agreements. See the NOTICE file distributed with
06: * this work for additional information regarding copyright ownership.
07: * The ASF licenses this file to You under the Apache License, Version 2.0
08: * (the "License"); you may not use this file except in compliance with
09: * the License. You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: */
19:
20: final class FieldInfo {
21: String name;
22: boolean isIndexed;
23: int number;
24:
25: // true if term vector for this field should be stored
26: boolean storeTermVector;
27: boolean storeOffsetWithTermVector;
28: boolean storePositionWithTermVector;
29:
30: boolean omitNorms; // omit norms associated with indexed fields
31:
32: boolean storePayloads; // whether this field stores payloads together with term positions
33:
34: FieldInfo(String na, boolean tk, int nu, boolean storeTermVector,
35: boolean storePositionWithTermVector,
36: boolean storeOffsetWithTermVector, boolean omitNorms,
37: boolean storePayloads) {
38: name = na;
39: isIndexed = tk;
40: number = nu;
41: this .storeTermVector = storeTermVector;
42: this .storeOffsetWithTermVector = storeOffsetWithTermVector;
43: this .storePositionWithTermVector = storePositionWithTermVector;
44: this .omitNorms = omitNorms;
45: this .storePayloads = storePayloads;
46: }
47:
48: public Object clone() {
49: return new FieldInfo(name, isIndexed, number, storeTermVector,
50: storePositionWithTermVector, storeOffsetWithTermVector,
51: omitNorms, storePayloads);
52: }
53: }
|