blob: 09aa55f776bc4e14139a5eb0852140fca3a94b38 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.documentmodel;
import com.yahoo.document.DataType;
import com.yahoo.document.DataTypeName;
import com.yahoo.document.PositionDataType;
/**
* This class represents the builtin 'doument' document type that all other documenttypes inherits.
* Remember that changes here must be compatible. Changes to types of fields can not be done here.
* This must also match the mirroring class in c++.
*
* @author baldersheim
*/
public class VespaDocumentType {
public static NewDocumentType INSTANCE = newInstance();
public static DataTypeName NAME = new DataTypeName("document");
private static NewDocumentType newInstance() {
NewDocumentType vespa = new NewDocumentType(new NewDocumentType.Name(8, "document"));
vespa.add(DataType.BYTE);
vespa.add(DataType.INT);
vespa.add(DataType.LONG);
vespa.add(DataType.STRING);
vespa.add(DataType.RAW);
vespa.add(DataType.TAG);
vespa.add(DataType.FLOAT);
vespa.add(DataType.DOUBLE);
vespa.add(DataType.DOCUMENT);
vespa.add(PositionDataType.INSTANCE);
vespa.add(DataType.URI);
vespa.add(DataType.PREDICATE);
return vespa;
}
}
|