docs/search.md
This configuration will enable Find searches:
api/v1.0/documents/search/ will be used as proxy for searching documents from Find indexes.Configure a Service for Docs application with these settings
docs
request.auth.name of the Docs application.impress
Name of the token audience or client_id of the Docs application.See how-to-use-indexer.md for details.
Find uses a service provider authentication for indexing and a OIDC authentication for searching.
Add those Django settings to the Docs application to enable the feature.
SEARCH_INDEXER_CLASS="core.services.search_indexers.FindDocumentIndexer"
SEARCH_INDEXER_COUNTDOWN=10 # Debounce delay in seconds for the indexer calls.
SEARCH_INDEXER_QUERY_LIMIT=50 # Maximum number of results expected from the search endpoint
INDEXING_URL="http://find:8000/api/v1.0/documents/index/"
SEARCH_URL="http://find:8000/api/v1.0/documents/search/"
# Service provider authentication
SEARCH_INDEXER_SECRET="find-api-key-for-docs-with-exactly-50-chars-length"
# OIDC authentication
OIDC_STORE_ACCESS_TOKEN=True # Store the access token in the session
OIDC_STORE_REFRESH_TOKEN=True # Store the encrypted refresh token in the session
OIDC_STORE_REFRESH_TOKEN_KEY="<your-32-byte-encryption-key==>"
OIDC_STORE_REFRESH_TOKEN_KEY must be a valid Fernet key (32 url-safe base64-encoded bytes).
To create one, use the bin/generate-oidc-store-refresh-token-key.sh command.
The Find search integration is controlled by two feature flags:
flag_find_hybrid_searchflag_find_full_text_searchIf a user has both flags activated the most advanced search is used (hybrid > full text > title). A user with no flag will default to the basic title search.
Feature flags can be activated through the admin interface.