add check_similar_first for global search
This commit is contained in:
@@ -41,46 +41,6 @@ export async function searchGlobalFiles(fileId: string, currentPage: number) {
|
|||||||
const token = await getSessionData('token');
|
const token = await getSessionData('token');
|
||||||
|
|
||||||
//удалить когда поиск будет нормально работать
|
//удалить когда поиск будет нормально работать
|
||||||
/* return {
|
|
||||||
images: [
|
|
||||||
{
|
|
||||||
url: 'string1',
|
|
||||||
pageTitle: `string1 from page ${currentPage}`,
|
|
||||||
height: 100,
|
|
||||||
width: 100,
|
|
||||||
host: 'string1',
|
|
||||||
pageUrl: 'string1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: 'string1',
|
|
||||||
pageTitle: `string2 from page ${currentPage}`,
|
|
||||||
height: 100,
|
|
||||||
width: 100,
|
|
||||||
host: 'string1',
|
|
||||||
pageUrl: 'string1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: 'string1',
|
|
||||||
pageTitle: `string3 from page ${currentPage}`,
|
|
||||||
height: 100,
|
|
||||||
width: 100,
|
|
||||||
host: 'string1',
|
|
||||||
pageUrl: 'string1'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
page: 0,
|
|
||||||
pageSize: 0,
|
|
||||||
totalPages: 11,
|
|
||||||
totalResults: 100,
|
|
||||||
} */
|
|
||||||
|
|
||||||
/* return {
|
|
||||||
images: [],
|
|
||||||
page: 0,
|
|
||||||
pageSize: 0,
|
|
||||||
totalPages: 0,
|
|
||||||
totalResults: 0
|
|
||||||
} */
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
|
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
|
||||||
@@ -91,6 +51,7 @@ export async function searchGlobalFiles(fileId: string, currentPage: number) {
|
|||||||
message_body: {
|
message_body: {
|
||||||
file_id: fileId,
|
file_id: fileId,
|
||||||
page: currentPage,
|
page: currentPage,
|
||||||
|
check_similar_first: true,
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
Reference in New Issue
Block a user