Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEWS FEED | As a user of the app I want a search functionality trough all inserted News that searches on Title and Basetext #22

Open
RudiThoeni opened this issue Mar 15, 2022 · 3 comments
Assignees

Comments

@RudiThoeni
Copy link
Member

RudiThoeni commented Mar 15, 2022

connected to #20
Provide a search functionality with the ODH Find Api

@RudiThoeni RudiThoeni self-assigned this Mar 15, 2022
@RudiThoeni
Copy link
Member Author

RudiThoeni commented Mar 15, 2022

We can reuse ODHs Find Endpoint to search for news by passing the searchterm and activating searchbasetext=true
(https://tourism.opendatahub.bz.it/swagger/index.html#/Search/get_v1_Find)
https://tourism.api.opendatahub.bz.it/v1/Find?term=old%20text&odhtype=article&searchbasetext=true&rawfilter=eq(Type,"newsfeednoi")&rawsort=-ArticleDate

but we have also to add the filtering by day and active elements
https://tourism.api.opendatahub.bz.it/v1/Find?term=text&odhtype=article&searchbasetext=true&rawfilter=and(le(ArticleDate,"2022-03-15"),eq(OdhActive,true),eq(Type,"newsfeednoi"))&rawsort=-ArticleDate

If we want to get more fields we can add at example
&fields=ContactInfos.en.CompanyName,ContactInfos.en.LogoUrl

@macteo
Copy link
Collaborator

macteo commented Apr 6, 2022

Thanks @RudiThoeni for listing the available endpoints that support search.
However the responses by those APIs seems different that the ones available from the standard news one.
Also it is not clear how the responses match the proposed UI with search results highlighting directly on the existing interface.

We highly suggest to further analyse together this user story.

@RudiThoeni
Copy link
Member Author

This search endpoint is generic so here you have to add all fields you would like to have in the response example (adding ContactInfos,Detail,Type,ArticleDate,ArticleDateTo)

https://tourism.api.opendatahub.bz.it/v1/Find?term=text&odhtype=article&searchbasetext=true&rawfilter=and(le(ArticleDate,%222022-03-15%22),eq(OdhActive,true),eq(Type,%22newsfeednoi%22))&rawsort=-ArticleDate&fields=ContactInfos,Detail,Type,ArticleDate,ArticleDateTo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants