Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIMU INDX] File format for DDIC secondary indexes #354

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions file-formats/tabl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# TABL File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.tabl.json` | 1 | *does not exist, yet* | *does not exist, yet* | *does not exist, yet*
`<name>.tabl.<indexname>.indx.json` | 0..n | [`zif_aff_indx_v1.intf.abap`](./type/zif_aff_indx_v1.intf.abap) | [`indx-v1.json`](./indx-v1.json) | `zaff_exmpl_tabl.tabl.001.indx.json`
109 changes: 109 additions & 0 deletions file-formats/tabl/indx-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
schneidermic0 marked this conversation as resolved.
Show resolved Hide resolved
"$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/indx/indx-v1.json",
"title": "ABAP DDIC Secondary Index Properties",
"description": "Object type INDX",
"type": "object",
"properties": {
"formatVersion": {
"title": "ABAP File Format Version",
"description": "The ABAP file format version",
"type": "string",
"const": "1"
},
"header": {
"title": "Header",
"description": "Header",
"type": "object",
"properties": {
"description": {
"title": "Description",
"description": "Description of the ABAP object",
"type": "string",
"maxLength": 60
},
"originalLanguage": {
"title": "Original Language",
"description": "Original language of the ABAP object",
"type": "string",
"minLength": 2,
"maxLength": 2,
"pattern": "^[a-z]+$"
},
"abapLanguageVersion": {
"title": "ABAP Language Version",
"description": "ABAP language version",
"type": "string",
"enum": [
"standard",
"keyUser",
"cloudDevelopment"
],
"enumTitles": [
"Standard",
"ABAP for Key Users",
"ABAP Cloud Development"
],
"enumDescriptions": [
"Standard",
"ABAP for key user extensibility",
"ABAP cloud development"
],
"default": "standard"
}
},
"additionalProperties": false,
"required": [
"description",
"originalLanguage"
]
},
"textIndex": {
"title": "Text Index",
"description": "Standard- or text-Index",
"type": "boolean",
"default": false
},
"uniqueIndex": {
"title": "Unique",
"description": "Unique flag",
"type": "boolean",
"default": false
},
"indexFields": {
"title": "Fields",
"description": "Index fields",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Index Fields",
"description": "Index fields",
"type": "object",
"properties": {
"fieldname": {
"title": "Field Name",
"description": "Field name",
"type": "string",
"maxLength": 30
},
"position": {
"title": "Field Position",
"description": "Position",
"type": "string",
"maxLength": 4,
"pattern": "^[0-9]+$"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"textIndex",
"uniqueIndex"
]
}
74 changes: 74 additions & 0 deletions file-formats/tabl/type/zif_aff_indx_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
INTERFACE zif_aff_indx_v1
PUBLIC.

TYPES:
"! <p class="shorttext">Index Fields</p>
"! Index fields
BEGIN OF ty_indexfield,
"! <p class="shorttext">Field Name</p>
"! Field name
"! $required
field_name TYPE c LENGTH 30,
END OF ty_indexfield,
tt_index_fields TYPE TABLE OF ty_indexfield WITH DEFAULT KEY
WITH UNIQUE SORTED KEY name_unique COMPONENTS field_name,
"! <p class="shorttext">FTI Properties</p>
"! Properties of an Fulltext-Index
BEGIN OF ty_fti_properties,
"! <p class="shorttext">Language Column for Full-Text Index</p>
language_column TYPE c LENGTH 30,
"! <p class="shorttext">Column for Mime Type</p>
mime_type_column TYPE c LENGTH 30,
"! <p class="shorttext">Mime Type for Full-Text Index</p>
mime_type TYPE c LENGTH 127,
"! <p class="shorttext">Languages for Automatic Language Detection</p>
language_detection TYPE c LENGTH 200,
"! <p class="shorttext">Fast Preprocessing On/Off</p>
fast_preprocess TYPE abap_bool,
"! <p class="shorttext">Additional Index for Fuzzy Search</p>
fuzzy_search_index TYPE abap_bool,
"! <p class="shorttext">Original formatting will be removed</p>
search_only TYPE abap_bool,
"! <p class="shorttext">Update Mode of Full-Text Index</p>
update_mode TYPE c LENGTH 10,
"! <p class="shorttext">Type of Text Analysis</p>
configuration TYPE c LENGTH 1,
"! <p class="shorttext">Ratio Phrase Index to Full-Text Index</p>
phrase_index_ratio TYPE n LENGTH 3,
"! <p class="shorttext">Switches on the text analysis</p>
text_analysis TYPE abap_bool,
"! <p class="shorttext">Token Delimiters</p>
token_separators TYPE c LENGTH 50,
END OF ty_fti_properties.

TYPES:
"! <p class="shorttext">ABAP DDIC Secondary Index Properties</p>
"! Object type INDX
BEGIN OF ty_main,
"! $required
format_version TYPE zif_aff_types_v1=>ty_format_version,
"! <p class="shorttext">Header</p>
"! Header
"! $required
header TYPE zif_aff_types_v1=>ty_header_60,
"! <p class="shorttext">Token Index</p>
"! Token-Index
token_index TYPE abap_bool,
"! <p class="shorttext">Fulltext-Index</p>
"! Fulltext-Index
fulltext_index TYPE abap_bool,
"! <p class="shorttext">Unique Index</p>
"! Unique flag
unique_index TYPE abap_bool,
"! <p class="shorttext">No DB Index</p>
"! Index not on DB, only for ABAP table buffer
no_db_index TYPE abap_bool,
"! <p class="shorttext">Fields</p>
"! Index fields
index_fields TYPE tt_index_fields,
"! <p class="shorttext">Fulltext Index</p>
"! Fulltext Index Properties
fti_properties TYPE ty_fti_properties,
END OF ty_main.

ENDINTERFACE.
177 changes: 177 additions & 0 deletions file-formats/tabl/type/zif_aff_indx_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/tabl/indx-v1.json",
"title": "ABAP DDIC Secondary Index Properties",
"description": "Object type INDX",
"type": "object",
"properties": {
"formatVersion": {
"title": "ABAP File Format Version",
"description": "The ABAP file format version",
"type": "string",
"const": "1"
},
"header": {
"title": "Header",
"description": "Header",
"type": "object",
"properties": {
"description": {
"title": "Description",
"description": "Description of the ABAP object",
"type": "string",
"maxLength": 60
},
"originalLanguage": {
"title": "Original Language",
"description": "Original language of the ABAP object",
"type": "string",
"minLength": 2,
"maxLength": 2,
"pattern": "^[a-z]+$"
},
"abapLanguageVersion": {
"title": "ABAP Language Version",
"description": "ABAP language version",
"type": "string",
"enum": [
"standard",
"keyUser",
"cloudDevelopment"
],
"enumTitles": [
"Standard",
"ABAP for Key Users",
"ABAP Cloud Development"
],
"enumDescriptions": [
"Standard",
"ABAP for key user extensibility",
"ABAP cloud development"
],
"default": "standard"
}
},
"additionalProperties": false,
"required": [
"description",
"originalLanguage"
]
},
"tokenIndex": {
"title": "Token Index",
"description": "Token-Index",
"type": "boolean"
},
"fulltextIndex": {
"title": "Fulltext-Index",
"description": "Fulltext-Index",
"type": "boolean"
},
"uniqueIndex": {
"title": "Unique Index",
"description": "Unique flag",
"type": "boolean"
},
"noDbIndex": {
"title": "No DB Index",
"description": "Index not on DB, only for ABAP table buffer",
"type": "boolean"
},
"indexFields": {
"title": "Fields",
"description": "Index fields",
"type": "array",
"items": {
"title": "Index Fields",
"description": "Index fields",
"type": "object",
"properties": {
"fieldName": {
"title": "Field Name",
"description": "Field name",
"type": "string",
"maxLength": 30
}
},
"additionalProperties": false,
"required": [
"fieldName"
]
}
},
"ftiProperties": {
"title": "Fulltext Index",
"description": "Fulltext Index Properties",
"type": "object",
"properties": {
"languageColumn": {
"title": "Language Column for Full-Text Index",
"type": "string",
"maxLength": 30
},
"mimeTypeColumn": {
"title": "Column for Mime Type",
"type": "string",
"maxLength": 30
},
"mimeType": {
"title": "Mime Type for Full-Text Index",
"type": "string",
"maxLength": 127
},
"languageDetection": {
"title": "Languages for Automatic Language Detection",
"type": "string",
"maxLength": 200
},
"fastPreprocess": {
"title": "Fast Preprocessing On/Off",
"type": "boolean"
},
"fuzzySearchIndex": {
"title": "Additional Index for Fuzzy Search",
"type": "boolean"
},
"searchOnly": {
"title": "Original formatting will be removed",
"type": "boolean"
},
"updateMode": {
"title": "Update Mode of Full-Text Index",
"type": "string",
"maxLength": 10
},
"configuration": {
"title": "Type of Text Analysis",
"type": "string",
"maxLength": 1
},
"phraseIndexRatio": {
"title": "Ratio Phrase Index to Full-Text Index",
"type": "string",
"maxLength": 3,
"pattern": "^[0-9]+$"
},
"textAnalysis": {
"title": "Switches on the text analysis",
"type": "boolean"
},
"tokenSeparators": {
"title": "Token Delimiters",
"type": "string",
"maxLength": 50
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header"
]
}