opened
kremalicious
username_0
For the beginning we need the following queries, accessible via UI with filters & reflected in search query URLs:

- text search: `/search?text=searchtext`
- tag search: `/search?tags=tagtext`
- category search: `/search?categories=categorytext` (needs reintroduction of categories during publish)
- price search: `/search?minPrice=1&maxPrice=3` (this one needs a decision first what exactly our price represents, see #35)
- search for data token info as part of `text` search

All of them:
- need to be combinable
- need to account for pagination (have `&page=2` in query)

Most of the functionality is in place in the codebase, needs to be connected and verified it all works.
minimum viable search
issue
created
trentmc
username_1
Higher priority because this will really help usability
comment
created
trentmc
username_1
Matthias will take this to start with, to spec it out better first.
comment
created
mihaisc
username_2
When sorting by liquidity 'asc' the first few pages are filled with assets that have no pricing or have fixed price. When sorting by liquidity should we show only assets with pools? If the users sorts by liquidity he is clearly interested in pools so it's a bad experience to go through multiple pages (8 pages at this date) until he finds the first asset with a pool.

![image](https://user-images.githubusercontent.com/26000280/104913937-05f7ed00-5997-11eb-9720-d616bf752d0f.png)
comment
created
bogdanfazakas
username_3
comment
closed
bogdanfazakas
username_3
issue
reopened
bogdanfazakas
username_3
Quick wins with current technology where we use Aquarius `nativeSearch` in the `/search` route. This also means all sorting & filtering actions fire a server search to Aquarius:

### Sorting

- by default, sort results by date created, newest first
- sort results by liquidity, from highest to lowest (`ddo.price.ocean`)
- sort results by price, from highest to lowest (`ddo.price.value`)
- needs UI pattern for sorting actions

### Filtering

- filter to show only pools/only exchanges
- needs UI pattern for filter actions
minimum viable search
issue
created
kremalicious
username_0
good point, first thought would be in UI to auto-switch to `FIXED` whenever `LIQUIDITY` is clicked on which should make this then clear
comment
created
mihaisc
username_2
That's a good idea, it's clear and transparent to the user
comment
created
bogdanfazakas
username_3
so basically every time the user sorts the result by `LIQUIDITY` we will also apply the price filter with `DYNAMIC` and display only assets with price.type pool ?  Should we do the same when `PRICE` is selected and display only assets that have price.type exchange ?
comment
created
mihaisc
username_2
Yes regarding the first part with `LIQUIDITY`, no to the second part. Both types ( `FIXED` or exchange  and `DYNAMIC` or pool ) have price. At best we can have another option to ignore assets that have no pricing set on them
comment
created
bogdanfazakas
username_3
Ok then I'll handle the first part initially, then if we decide we need to ignore assets with no price will do that also.
comment
created
mihaisc
username_2
Should we have a filter to ignore assets without pricing? there are a few pages of them
comment
created
bogdanfazakas
username_3
We can have a new filter called let's say `WITH PRICE` and display only assets with price.value greater than 0.
We'll end up with something like this in the UI.
![Screenshot 2021-01-19 at 13 03 30](https://user-images.githubusercontent.com/13447142/105026125-e2947700-5a56-11eb-92bc-c9fdbc8368ef.png)
comment
created
mihaisc
username_2
The correct query would be `price.isConsumable = "true" ` (syntax probably not ok), but it's currently blocked by https://github.com/oceanprotocol/aquarius/issues/361
comment
closed
kremalicious
username_0
issue