about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/api/v1/search_controller.rb2
-rw-r--r--app/javascript/flavours/glitch/actions/search.js2
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/search_results.js2
-rw-r--r--app/services/search_service.rb5
4 files changed, 5 insertions, 6 deletions
diff --git a/app/controllers/api/v1/search_controller.rb b/app/controllers/api/v1/search_controller.rb
index 37b45221b..639e71493 100644
--- a/app/controllers/api/v1/search_controller.rb
+++ b/app/controllers/api/v1/search_controller.rb
@@ -3,7 +3,7 @@
 class Api::V1::SearchController < Api::BaseController
   include Authorization
 
-  RESULTS_LIMIT = 66
+  RESULTS_LIMIT = 100
 
   before_action -> { doorkeeper_authorize! :read, :'read:search' }
   before_action :require_user!
diff --git a/app/javascript/flavours/glitch/actions/search.js b/app/javascript/flavours/glitch/actions/search.js
index f1fcf1cc6..da3f6fa40 100644
--- a/app/javascript/flavours/glitch/actions/search.js
+++ b/app/javascript/flavours/glitch/actions/search.js
@@ -37,7 +37,7 @@ export function submitSearch() {
       params: {
         q: value,
         resolve: true,
-        limit: 33,
+        limit: 100,
       },
     }).then(response => {
       if (response.data.accounts) {
diff --git a/app/javascript/flavours/glitch/features/compose/components/search_results.js b/app/javascript/flavours/glitch/features/compose/components/search_results.js
index 893b0b4e7..222844fb9 100644
--- a/app/javascript/flavours/glitch/features/compose/components/search_results.js
+++ b/app/javascript/flavours/glitch/features/compose/components/search_results.js
@@ -99,9 +99,9 @@ class SearchResults extends ImmutablePureComponent {
           <FormattedMessage id='search_results.total' defaultMessage='{count, number} {count, plural, one {result} other {results}}' values={{ count }} />
         </header>
 
+        {accounts}
         {hashtags}
         {statuses}
-        {accounts}
       </div>
     );
   };
diff --git a/app/services/search_service.rb b/app/services/search_service.rb
index 1ba2f227f..0b08688c4 100644
--- a/app/services/search_service.rb
+++ b/app/services/search_service.rb
@@ -14,7 +14,6 @@ class SearchService < BaseService
         results.merge!(url_resource_results) unless url_resource.nil?
       elsif @query.present?
         results[:accounts] = perform_accounts_search! if account_searchable?
-        results[:statuses] = perform_statuses_search! if full_text_searchable?
         results[:hashtags] = perform_hashtags_search! if hashtag_searchable?
         results[:statuses] = Status.search_for(query.gsub(/\A#/, ''), limit, account) unless query.start_with?('@') or query.start_with?('#')
       end
@@ -27,7 +26,7 @@ class SearchService < BaseService
     AccountSearchService.new.call(
       @query,
       @account,
-      limit: @limit,
+      limit: [@limit, 15].min,
       resolve: @resolve,
       offset: @offset
     )
@@ -61,7 +60,7 @@ class SearchService < BaseService
   def perform_hashtags_search!
     Tag.search_for(
       @query.gsub(/\A#/, ''),
-      @limit,
+      [@limit, 30].min,
       @offset
     )
   end