mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-09 06:17:52 +00:00
remove phrase search mask, allow sphinx macroses
This commit is contained in:
parent
e418ddcd32
commit
9ae91ee187
@ -34,8 +34,8 @@ if (API_ENABLED) {
|
|||||||
$page = !empty($_GET['page']) ? Filter::url($_GET['page']) : 1;
|
$page = !empty($_GET['page']) ? Filter::url($_GET['page']) : 1;
|
||||||
|
|
||||||
// Make search request
|
// Make search request
|
||||||
$sphinxResultsTotal = $sphinx->searchHostPagesTotal('"' . $query . '"');
|
$sphinxResultsTotal = $sphinx->searchHostPagesTotal($query);
|
||||||
$sphinxResults = $sphinx->searchHostPages('"' . $query . '"', $page * API_SEARCH_PAGINATION_RESULTS_LIMIT - API_SEARCH_PAGINATION_RESULTS_LIMIT, API_SEARCH_PAGINATION_RESULTS_LIMIT, $sphinxResultsTotal);
|
$sphinxResults = $sphinx->searchHostPages($query, $page * API_SEARCH_PAGINATION_RESULTS_LIMIT - API_SEARCH_PAGINATION_RESULTS_LIMIT, API_SEARCH_PAGINATION_RESULTS_LIMIT, $sphinxResultsTotal);
|
||||||
|
|
||||||
// Generate results
|
// Generate results
|
||||||
$dbResults = [];
|
$dbResults = [];
|
||||||
|
@ -106,8 +106,8 @@ if (filter_var($q, FILTER_VALIDATE_URL) && preg_match(CRAWL_URL_REGEXP, $q)) {
|
|||||||
// Search request
|
// Search request
|
||||||
if (!empty($q)) {
|
if (!empty($q)) {
|
||||||
|
|
||||||
$resultsTotal = $sphinx->searchHostPagesTotal('"' . $q . '"');
|
$resultsTotal = $sphinx->searchHostPagesTotal($q);
|
||||||
$results = $sphinx->searchHostPages('"' . $q . '"', $p * WEBSITE_PAGINATION_SEARCH_RESULTS_LIMIT - WEBSITE_PAGINATION_SEARCH_RESULTS_LIMIT, WEBSITE_PAGINATION_SEARCH_RESULTS_LIMIT, $resultsTotal);
|
$results = $sphinx->searchHostPages($q, $p * WEBSITE_PAGINATION_SEARCH_RESULTS_LIMIT - WEBSITE_PAGINATION_SEARCH_RESULTS_LIMIT, WEBSITE_PAGINATION_SEARCH_RESULTS_LIMIT, $resultsTotal);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user