|
|
@ -1107,7 +1107,7 @@ defmodule Explorer.Chain do |
|
|
|
{:some, term} -> |
|
|
|
{:some, term} -> |
|
|
|
query = |
|
|
|
query = |
|
|
|
from(token in Token, |
|
|
|
from(token in Token, |
|
|
|
where: fragment("to_tsvector('english', symbol || ' ' || name ) @@ to_tsquery(?)", ^term), |
|
|
|
where: fragment("to_tsvector(symbol || ' ' || name ) @@ to_tsquery(?)", ^term), |
|
|
|
select: %{ |
|
|
|
select: %{ |
|
|
|
contract_address_hash: token.contract_address_hash, |
|
|
|
contract_address_hash: token.contract_address_hash, |
|
|
|
symbol: token.symbol, |
|
|
|
symbol: token.symbol, |
|
|
@ -1130,7 +1130,7 @@ defmodule Explorer.Chain do |
|
|
|
{:some, term} -> |
|
|
|
{:some, term} -> |
|
|
|
query = |
|
|
|
query = |
|
|
|
from(smart_contract in SmartContract, |
|
|
|
from(smart_contract in SmartContract, |
|
|
|
where: fragment("to_tsvector('english', name ) @@ to_tsquery(?)", ^term), |
|
|
|
where: fragment("to_tsvector(name) @@ to_tsquery(?)", ^term), |
|
|
|
select: %{contract_address_hash: smart_contract.address_hash, name: smart_contract.name}, |
|
|
|
select: %{contract_address_hash: smart_contract.address_hash, name: smart_contract.name}, |
|
|
|
order_by: [desc: smart_contract.inserted_at] |
|
|
|
order_by: [desc: smart_contract.inserted_at] |
|
|
|
) |
|
|
|
) |
|
|
|