<?php

/**
 * OpenKM, Open Knowledge Management System S.L.  (http://www.openkm.com)
 * Copyright (c) 2006-2018
 *
 * No bytes were intentionally harmed during the development of this application.
 *
 * This program is commercial software; you can use it under the terms of the
 * EULA - OpenKM SDK End User License Agreement as published by OpenKM Knowledge Management System S.L.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * EULA - OpenKM SDK End User License Agreement for more details:
 * http://docs.openkm.com/kcenter/view/licenses/eula-openkm-sdk-end-user-license-agreement.html
 */

namespace openkm\definition;

use openkm\bean\QueryParams;
use openkm\bean\SearchSortField;

/**
 * BaseSearch
 *
 * @author sochoa
 */
interface BaseSearch {

    public function find(QueryParams $queryParams, $sortField = SearchSortField::NAME, $sortReverse = false, $propertiesPlugin = null);

    public function findPaginated(QueryParams $queryParams, $offset, $limit, $sortField = SearchSortField::NAME, $sortReverse = false, $propertiesPlugin = null);

    public function findByQuery($query, $propertiesPlugin = null);

    public function findByQueryPaginated($query, $offset, $limit, $propertiesPlugin = null);

    public function findSimpleQueryPaginated($statement, $offset, $limit);

    public function findMoreLikeThis($uuid, $max);

    public function getKeywordMap($filter = []);

    public function getCategorizedDocuments($categoryId);

    public function saveSearch(QueryParams $params);

    public function updateSearch(QueryParams $params);

    public function getSearch($qpId);

    public function getAllSearchs();

    public function deleteSearch($qpId);
}

?>
