Skip to content
New issue

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

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

Already on GitHub? # to your account

Blog post #106

Merged
merged 8 commits into from
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
@@ -14,3 +14,9 @@ github:
protected_branches:
main
production

notifications:
jobs: janhoy@apache.org
issues: janhoy@apache.org
pullrequests: janhoy@apache.org
jira_options: link label worklog
30 changes: 30 additions & 0 deletions .github/workflows/build-pelican.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build Solr website with ASF Pelican action

on:
push:
branches: [ "main", "production" ]
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'build.sh'
- '.editorconfig'
- '.gitignore'
- '.gitattributes'
workflow_dispatch:

jobs:
build-pelican:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref == 'refs/heads/production' && 'production' || 'main' }}

- name: Build Pelican Site
uses: apache/infrastructure-actions/pelican@main
with:
destination: ${{ github.ref == 'refs/heads/production' && 'asf-site' || 'asf-staging' }}
gfm: 'false'
version: '4.9.1'
34 changes: 34 additions & 0 deletions .github/workflows/pr-build-pelican.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build Solr website with ASF Pelican action for PRs

on:
pull_request:
branches:
- '**'

jobs:
build-pelican:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
# This is the version of the action for setting up Python, not the Python version.
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install Pelican
shell: bash
# Install needs to run in separate shell so stdout is restored
run: |
(
pip3 install pelican==4.9.1 markdown bs4 ezt requests
)
python3 -V
echo "Pelican version:"
pelican --version
# If the site uses Github Flavored Markdown, use this build branch
- name: Generate website from markdown
shell: bash
run: |
python3 -B -m pelican content
12 changes: 12 additions & 0 deletions content/pages/blogposts/2024-06-17-hybrid-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Title: Hybrid Search with Apache Solr
category: solr/blogposts
summary: This blog shows how to run a hybrid search (keyword-based search + vectors) in Apache Solr with code examples and explanations. Written by Alessandro Benedetti, Director at Sease and Apache Solr Committer and PMC member.
slug: hybrid-search-with-apache-solr
URL: blogposts/hybrid-search-with-apache-solr.html
save_as: blogposts/hybrid-search-with-apache-solr.html

# Hybrid Search with Apache Solr
Contrary to popular misconception, Solr already supports hybrid search (the combination of keyword and vector-based search techniques)!
Hybrid search can be used in retrieval, ranking, and even Solr's commonly-used "Learning to Rank" module. Alessandro Benedetti, Director at Sease and Apache Solr Committer and PMC member, explains more in a recent post, complete with code examples and explanation.

Learn how you can start using hybrid search in your deployments today - the complete post can be read here: [Hybrid Search with Apache Solr](https://sease.io/2023/12/hybrid-search-with-apache-solr.html)
10 changes: 6 additions & 4 deletions pelicanconf.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
from datetime import datetime, date
from checksumdir import dirhash
#from checksumdir import dirhash

AUTHOR = 'Solr Developers'
SITENAME = 'Apache Solr'
@@ -20,7 +20,9 @@

# This string will be appended to all unversioned css and js resources to prevent caching surprises on edits.
# The theme's htaccess file also sets a cache-control header with longer lifetime, if the v=XXXX query string is added.
STATIC_RESOURCE_SUFFIX = "?v=%s" % dirhash('themes/solr/static', 'sha1')[-8:]
#STATIC_RESOURCE_SUFFIX = "?v=%s" % dirhash('themes/solr/static', 'sha1')[-8:]
# SOLR-17339: Dynamic hash disabled until we can install custom modules like checksumdir. Bump this manually on changes
STATIC_RESOURCE_SUFFIX = "?v=4dd59757"

PATH = 'content'

@@ -97,14 +99,14 @@
'jinja2content',
'regex_replace',
'age_days_lt',
'vex'
# SOLR-17339: Vex disabled until https://github.com/apache/infrastructure-actions/pull/63 is merged
# 'vex'
# 'md_inline_extension',
]

MARKDOWN = {
'extension_configs': {
'toc': {},
'mdx_include': {},
'markdown.extensions.codehilite': {'css_class': 'codehilite'},
'markdown.extensions.extra': {},
'markdown.extensions.meta': {},
17 changes: 8 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
pelican~=4.5.4
Markdown~=3.3.3
checksumdir~=1.2.0
pelican~=4.9.1
Markdown~=3.4
#checksumdir~=1.2.0

# Pelican plugins
mdx-include~=1.4.1
beautifulsoup4~=4.9.3
beautifulsoup4~=4.12.3
# Dependencies of the vex plugin
jsonschema~=4.17.3
jsonref~=1.0.1
#jsonschema~=4.22.0
#jsonref~=1.1.0

# Dev tools
invoke~=1.5.0
invoke~=2.2.0
livereload~=2.6.3

# Patch for bug https://github.com/pallets/markupsafe/issues/284
markupsafe~=2.0.1
markupsafe~=2.1.5
Loading