Search was broken in Japanese! (#120)

* Remove ap call

* Fix remix render method

* Downcase username on db end

There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.

* Remove ap call and unused code

* Add granblue.team to cors

This works now!

* Implement all-entity search to support tagging objects (#117)

* Add table for multisearch

* Add new route for searching all entities

* Make models multisearchable

We're going to start with Character, Summon, Weapon and Jobs

* Add method to Search controller

This will search with trigram first, and then if there aren't enough results, search with prefixed text search

* Add support for Japanese all-entity search

* Update grid_summons_controller.rb

Set the proper uncap level for transcended summons

* Search is broken in Japanese!
This commit is contained in:
Justin Edmund 2023-07-06 18:08:08 -07:00 committed by GitHub
parent 6d51033d0e
commit c7b0c48428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,7 +67,7 @@ module Api
characters = if search_params[:query].present? && search_params[:query].length >= 2
if locale == 'ja'
Character.jp_search(search_params[:query]).where(conditions)
Character.ja_search(search_params[:query]).where(conditions)
else
Character.en_search(search_params[:query]).where(conditions)
end
@ -105,7 +105,7 @@ module Api
weapons = if search_params[:query].present? && search_params[:query].length >= 2
if locale == 'ja'
Weapon.jp_search(search_params[:query]).where(conditions)
Weapon.ja_search(search_params[:query]).where(conditions)
else
Weapon.en_search(search_params[:query]).where(conditions)
end
@ -138,7 +138,7 @@ module Api
summons = if search_params[:query].present? && search_params[:query].length >= 2
if locale == 'ja'
Summon.jp_search(search_params[:query]).where(conditions)
Summon.ja_search(search_params[:query]).where(conditions)
else
Summon.en_search(search_params[:query]).where(conditions)
end