From f1989450473c56eb84ef2b87b48b75da24b9cb89 Mon Sep 17 00:00:00 2001 From: Erwan Rouchet <rouchet@teklia.com> Date: Wed, 25 Sep 2019 07:45:43 +0000 Subject: [PATCH] Fuse pages and acts search together --- arkindex/schema.yml | 521 +++++++++++++++----------------------------- 1 file changed, 173 insertions(+), 348 deletions(-) diff --git a/arkindex/schema.yml b/arkindex/schema.yml index 8fe92aa..5991ca5 100644 --- a/arkindex/schema.yml +++ b/arkindex/schema.yml @@ -170,180 +170,6 @@ paths: security: [] tags: - elements - /api/v1/acts/: - get: - description: Get a list of acts with their parent registers or volumes, the - total number of transcriptions found in the act, and a few (not all) of the - transcriptions found inside of each act, with their source, type, zone and - image, for a given search query. - operationId: SearchActs - parameters: - - description: A page number within the paginated result set. - in: query - name: page - required: false - schema: - type: integer - - description: Number of results to return per page. - in: query - name: page_size - required: false - schema: - type: integer - responses: - '200': - content: - application/json: - schema: - properties: - count: - example: 123 - type: integer - next: - nullable: true - type: string - number: - example: 123 - type: integer - previous: - nullable: true - type: string - results: - items: - properties: - corpus: - properties: - id: - format: uuid - type: string - name: - maxLength: 250 - type: string - public: - type: boolean - required: - - name - type: object - date_from: - type: string - date_to: - type: string - id: - format: uuid - type: string - name: - maxLength: 250 - type: string - parent_paths: - items: - type: array - type: array - total_transcriptions: - type: integer - transcriptions: - items: - properties: - id: - format: uuid - type: string - score: - nullable: true - type: number - source: - properties: - id: - format: uuid - type: string - internal: - type: boolean - revision: - maxLength: 100 - type: string - slug: - maxLength: 100 - type: string - type: - enum: - - classifier - - recognizer - - ner - - dla - required: - - type - - slug - - revision - - internal - type: object - text: - nullable: true - type: string - type: - enum: - - page - - paragraph - - line - - word - - character - zone: - properties: - center: - items: - type: integer - type: array - id: - format: uuid - type: string - image_url: - format: uri - pattern: "^(?:[a-z0-9\\.\\-\\+]*)://(?:[^\\s:@/]+(?::[^\\\ - s:@/]*)?@)?(?:(?:25[0-5]|2[0-4]\\d|[0-1]?\\\ - d?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|[0-1]?\\d?\\\ - d)){3}|\\[[0-9a-f:\\.]+\\]|([a-z\xA1-\uFFFF\ - 0-9](?:[a-z\xA1-\uFFFF0-9-]{0,61}[a-z\xA1-\uFFFF\ - 0-9])?(?:\\.(?!-)[a-z\xA1-\uFFFF0-9-]{1,63}(?<!-))*\\\ - .(?!-)(?:[a-z\xA1-\uFFFF-]{2,63}|xn--[a-z0-9]{1,59})(?<!-)\\\ - .?|localhost))(?::\\d{2,5})?(?:[/?#][^\\s]*)?\\\ - Z" - type: string - polygon: - items: - type: array - type: array - url: - readOnly: true - type: string - required: - - polygon - - center - - image_url - type: object - required: - - type - - zone - - source - type: array - type: - enum: - - volume - - register - - act - - page - - surface - required: - - name - - type - - transcriptions - - total_transcriptions - - parent_paths - - corpus - - date_from - - date_to - type: array - type: object - description: '' - security: [] - tags: - - search /api/v1/classification/bulk/: post: description: Create multiple classifications at once on the same element with @@ -2854,6 +2680,179 @@ paths: description: '' tags: - elements + /api/v1/elements/search/: + get: + description: Get a list of elements with their parents, the total number of + transcriptions in each element, and a few (not all) of their transcriptions, + with their source, type, zone and image, for a given query. + operationId: SearchElements + parameters: + - description: A page number within the paginated result set. + in: query + name: page + required: false + schema: + type: integer + - description: Number of results to return per page. + in: query + name: page_size + required: false + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + properties: + count: + example: 123 + type: integer + next: + nullable: true + type: string + number: + example: 123 + type: integer + previous: + nullable: true + type: string + results: + items: + properties: + corpus: + properties: + id: + format: uuid + type: string + name: + maxLength: 250 + type: string + public: + type: boolean + required: + - name + type: object + date_from: + type: string + date_to: + type: string + id: + format: uuid + type: string + name: + maxLength: 250 + type: string + parent_paths: + items: + type: array + type: array + total_transcriptions: + type: integer + transcriptions: + items: + properties: + id: + format: uuid + type: string + score: + nullable: true + type: number + source: + properties: + id: + format: uuid + type: string + internal: + type: boolean + revision: + maxLength: 100 + type: string + slug: + maxLength: 100 + type: string + type: + enum: + - classifier + - recognizer + - ner + - dla + required: + - type + - slug + - revision + - internal + type: object + text: + nullable: true + type: string + type: + enum: + - page + - paragraph + - line + - word + - character + zone: + properties: + center: + items: + type: integer + type: array + id: + format: uuid + type: string + image_url: + format: uri + pattern: "^(?:[a-z0-9\\.\\-\\+]*)://(?:[^\\s:@/]+(?::[^\\\ + s:@/]*)?@)?(?:(?:25[0-5]|2[0-4]\\d|[0-1]?\\\ + d?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|[0-1]?\\d?\\\ + d)){3}|\\[[0-9a-f:\\.]+\\]|([a-z\xA1-\uFFFF\ + 0-9](?:[a-z\xA1-\uFFFF0-9-]{0,61}[a-z\xA1-\uFFFF\ + 0-9])?(?:\\.(?!-)[a-z\xA1-\uFFFF0-9-]{1,63}(?<!-))*\\\ + .(?!-)(?:[a-z\xA1-\uFFFF-]{2,63}|xn--[a-z0-9]{1,59})(?<!-)\\\ + .?|localhost))(?::\\d{2,5})?(?:[/?#][^\\s]*)?\\\ + Z" + type: string + polygon: + items: + type: array + type: array + url: + readOnly: true + type: string + required: + - polygon + - center + - image_url + type: object + required: + - type + - zone + - source + type: array + type: + enum: + - volume + - register + - act + - page + - surface + required: + - name + - type + - transcriptions + - total_transcriptions + - parent_paths + - corpus + - date_from + - date_to + type: array + type: object + description: '' + security: [] + tags: + - search /api/v1/elements/{id}/: get: description: List all parents and children of a single element @@ -8649,180 +8648,6 @@ paths: description: '' tags: - ml - /api/v1/pages/: - get: - description: Get a list of pages with their parent registers or volumes, the - total number of transcriptions found in the page, and a few (not all) of the - transcriptions found inside of each page, with their source, type, zone and - image, for a given search query. - operationId: SearchPages - parameters: - - description: A page number within the paginated result set. - in: query - name: page - required: false - schema: - type: integer - - description: Number of results to return per page. - in: query - name: page_size - required: false - schema: - type: integer - responses: - '200': - content: - application/json: - schema: - properties: - count: - example: 123 - type: integer - next: - nullable: true - type: string - number: - example: 123 - type: integer - previous: - nullable: true - type: string - results: - items: - properties: - corpus: - properties: - id: - format: uuid - type: string - name: - maxLength: 250 - type: string - public: - type: boolean - required: - - name - type: object - date_from: - type: string - date_to: - type: string - id: - format: uuid - type: string - name: - maxLength: 250 - type: string - parent_paths: - items: - type: array - type: array - total_transcriptions: - type: integer - transcriptions: - items: - properties: - id: - format: uuid - type: string - score: - nullable: true - type: number - source: - properties: - id: - format: uuid - type: string - internal: - type: boolean - revision: - maxLength: 100 - type: string - slug: - maxLength: 100 - type: string - type: - enum: - - classifier - - recognizer - - ner - - dla - required: - - type - - slug - - revision - - internal - type: object - text: - nullable: true - type: string - type: - enum: - - page - - paragraph - - line - - word - - character - zone: - properties: - center: - items: - type: integer - type: array - id: - format: uuid - type: string - image_url: - format: uri - pattern: "^(?:[a-z0-9\\.\\-\\+]*)://(?:[^\\s:@/]+(?::[^\\\ - s:@/]*)?@)?(?:(?:25[0-5]|2[0-4]\\d|[0-1]?\\\ - d?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|[0-1]?\\d?\\\ - d)){3}|\\[[0-9a-f:\\.]+\\]|([a-z\xA1-\uFFFF\ - 0-9](?:[a-z\xA1-\uFFFF0-9-]{0,61}[a-z\xA1-\uFFFF\ - 0-9])?(?:\\.(?!-)[a-z\xA1-\uFFFF0-9-]{1,63}(?<!-))*\\\ - .(?!-)(?:[a-z\xA1-\uFFFF-]{2,63}|xn--[a-z0-9]{1,59})(?<!-)\\\ - .?|localhost))(?::\\d{2,5})?(?:[/?#][^\\s]*)?\\\ - Z" - type: string - polygon: - items: - type: array - type: array - url: - readOnly: true - type: string - required: - - polygon - - center - - image_url - type: object - required: - - type - - zone - - source - type: array - type: - enum: - - volume - - register - - act - - page - - surface - required: - - name - - type - - transcriptions - - total_transcriptions - - parent_paths - - corpus - - date_from - - date_to - type: array - type: object - description: '' - security: [] - tags: - - search /api/v1/region/{id}/: get: description: Retrieve detailed information about a region -- GitLab