fix #2739 replace scroll api with /documents/all
This commit is contained in:
parent
8da5e98072
commit
aa89150ab7
2 changed files with 52 additions and 4 deletions
|
@ -299,6 +299,56 @@ paths:
|
|||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
/documents/all:
|
||||
get:
|
||||
tags:
|
||||
- search
|
||||
summary: Finds all documents by query
|
||||
description: Finds all documents by search conditions
|
||||
operationId: searchAllDocuments
|
||||
parameters:
|
||||
- name: q
|
||||
in: query
|
||||
description: Search words
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: Fess
|
||||
- name: num
|
||||
in: query
|
||||
description: The number of returned documents as a search result
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 0
|
||||
exclusiveMinimum: false
|
||||
maximum: 100
|
||||
exclusiveMaximum: false
|
||||
default: 20
|
||||
example: 20
|
||||
- name: sort
|
||||
in: query
|
||||
description: Sorted field name
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: score
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/x-ndjson:
|
||||
schema:
|
||||
type: string
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
/labels:
|
||||
get:
|
||||
tags:
|
||||
|
|
|
@ -124,8 +124,9 @@ public class SearchApiManager extends BaseApiManager {
|
|||
if (values.length > 5 && "favorite".equals(values[5])) {
|
||||
request.setAttribute(DOC_ID_FIELD, values[4]);
|
||||
return FormatType.FAVORITE;
|
||||
} else if (values.length > 4 && "all".equals(values[4])) {
|
||||
return FormatType.SCROLL;
|
||||
}
|
||||
// return FormatType.SCROLL;
|
||||
return FormatType.SEARCH;
|
||||
}
|
||||
if ("labels".equals(type)) {
|
||||
|
@ -143,9 +144,6 @@ public class SearchApiManager extends BaseApiManager {
|
|||
if ("suggest-words".equals(type)) {
|
||||
return FormatType.SUGGEST;
|
||||
}
|
||||
if ("scroll".equals(type)) {
|
||||
return FormatType.SCROLL;
|
||||
}
|
||||
// default
|
||||
return FormatType.OTHER;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue