Comments (5)
@tracy55 Thank you for filing this.
When querying the API, you cannot use the same GET parameters as you see in the frontend or the frontend query language. You need to use the Vespa YQL query language through the Vespa Search API.
Some examples are listed in the CORD-19 documentation under "Example API queries".
I'll update this issue with your exact query shortly.
from cord-19.
@tracy55 Your specific FE query would translate to something like this:
https://api.cord19.vespa.ai/search/?query=covid-19&summary=short&ranking=freshness&yql=select%20*%20from%20sources%20*%20where%20userQuery()%20and%20timestamp%20%3E%201577836800%20and%20journal%20contains%20%22the%20lancet%22%3b
Or - if using a POST request with the JSON (a bit easier to work with) it would look like this:
{
'yql': 'select * from sources * where userQuery() and timestamp > 1577836800 and journal contains "the lancet";',
'summary': 'short',
'query': 'covid-19',
'ranking': 'freshness'
}
Hope this helps.
from cord-19.
Thank you @frodelu this is very helpful, much appreciated.
from cord-19.
@frodelu I'm noticing some latency, what is the expected sla for this sample call https://api.cord19.vespa.ai/search/?query=covid-19&summary=short&hits=20&ranking=freshness&yql=select+*+from+sources+*+where+userQuery%28%29+and+timestamp+%3E+1577836800%3B
from cord-19.
About 10-15 ms. Where are you calling us from, and do you use persistent connections?
from cord-19.
Related Issues (7)
- Document AWS lambda and AWS gateway usage for cord-19 app HOT 5
- Faceting/Grouping Only Allows for a single selection per group HOT 3
- Link to Backed page not found HOT 1
- Dependency Dashboard
- sort by date is odd as freshness(timestamp) returns 1 for timestamps in the future HOT 10
- [Feature Request] Search maps HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cord-19.