You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
In addition to allowing to specify how the index should be populated, the queries.yaml should also specify the queries that can be run against the index. See the example below:
## index configuration for theblog (hackathon vii)#version: 1indices:
blog-posts:
source: htmlfetch: https://helix-norddal-anfibiacreativa.project-helix.page/{path}ranking:
- "desc(date)"
- typo
- words
- filters properties:
author:
select: .blog-author p avalue: "{textContent}"faceted: truetitle:
select: h1:first-of-typevalue: "{textContent}"date:
select: ".blog-author p:nth-child(2)"value: "{parseTimestamp(\"[POSTED ON] MM-DD-YYYY\")}"topics:
select: .blog-topics.default > ul > livalue: "{textContent}"faceted: truehero:
select: main > div > img:first-of-typevalue: "{src}"queries:
all:
query: *hitsPerPage: 25cache: 10 minutesby-authorparameters:
- authorquery: *filters: author:{author}cache: 5 minutes
This would enable two query endpoints:
_query/blog-posts/all
_query/blog-posts/by-author?author=Lars+Trieloff
The query configuration would be read during hlx publish and the proper VCL would be generated to forward the query to Algolia or MongoDB.
The text was updated successfully, but these errors were encountered:
In addition to allowing to specify how the index should be populated, the
queries.yaml
should also specify the queries that can be run against the index. See the example below:This would enable two query endpoints:
_query/blog-posts/all
_query/blog-posts/by-author?author=Lars+Trieloff
The query configuration would be read during
hlx publish
and the proper VCL would be generated to forward the query to Algolia or MongoDB.The text was updated successfully, but these errors were encountered: