feat: index contents/documentation/
for search along API
#128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Quick experiment for #123 & #110. Seems to work mostly with some rough edges.
Modifies
ApiSearchGenerator.php
ran with the existingcomposer build
action to also index Markdown files fromcontent/documentation/
andsearch.js
to list the entries with separate template per match type based on new "type" property added in search index results with values "documentation" or "api".Does some filtering on the markdown content during indexing which probably needs tuning to get best result, also the
search.js
weight settings might need tuning. Claude also though to changesearch.js
boolean logic from "AND" to "OR" for more flexible search results, but I did not evaluate that.Tests were modified to get them passing and some refactoring might be useful, coverage for the documentation search entries is not at same level as for API entries but not zero.
If combining search indexing logic in single file this way, should the
ApiSearchGenerator.php
be renamed to justSearchGenerator.php
? Other thoughts?