All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Support for separate, optional
search_field
configuration setting for defining the field (or fields) used when searching.
- Previously sort setting could not be cleared using module config screen; this has now been fixed. Additionally sort setting defaults to empty value.
- Fix an issue where Debugger throwing an exception when missing page was selected could prevent accessing module config screen.
- Support for including multiple templates in a single group using pipe separated values.
- Support for naming groups by providing string keys within the
gruoup_by_allow
option. - New option
group_labels
for providing labels for tabs rendered when grouping results.
- Fix unicode / multibyte character issues in Renderer, thanks to @esl51.
- Fix PHP warning resulting from repeatable field value being null when page is being indexed.
- Fix unlikely (but possible) error caused by module config screen being loaded after disabling module autoload via admin.
- Finnish translations.
- Fixed issue where IndexValue could sometimes receive unexpected null value, causing errors.
- Support for indexing Pagefile custom field values and tags.
- File field description is no longer indexed by default. In order to index description, it needs to be selected via indexed field config setting, specifically (
file_field_name.description
) or using wildcard (file_field_name.*
).
- Issue where Debugger was discarding some content unintentionally when debugging entire index.
- New IndexValue value object class.
- Indexing file fields stores file names and metadata, latter of which currently includes (per page) unique hash and modify timestamp, in page specific search index metadata.
- Indexer::getIndexValue() returns IndexValue instead of string.
- Processor discards meta keys before generating URL index.
- Debugger discards metadata before generating unique word list.
- Issue where some meta values were unintentionally included in combined text index.
- Minor updates for Debugger GUI.
- Improvements to Debugger unique word identification.
- Improvements to Debugger unique word identification.
- New hookable method Indexer::getPagefileIndexValue().
- New hookable methods Query::prepared(), QuerySet::prepared(), and QueryBase::prepared().
- Elapsed time is displayed after reindexing single page in module config screen (Debugger).
- Refactored parts of Indexer to better support potential future improvements.
- PHP 8.1 deprecation issue for QuerySet::getIterator()
- Added support for ProFields: Combo.
- Split code used for removing index field into separate method for the SearchEngine main class.
- PHP 8.1 deprecation in Renderer (trim() with null param).
- Improvements to _auto_desc and description highlighting for partial word matches.
- When Indexer::indexPage() is called with the save argument set to true (default value), use Pages::___saveField() instead of Page::save() to make sure that save related hooks are not unintentionally fired.
- An issue where JSON output no longer contained actual results due to result lazy loading changes made in 0.29.0.
- Fixes for tabs when used in Debugger.
- Automatically generated descriptions now support multi-part query string matching, i.e. query terms that are not in order, or not adjacent to each other.
- Highlighting words in the description text has been updated to support multiple separate word matches.
- Query object now has a readable results property, which works like getResults() except that null is always returned in case there are no results.
- New hookable method Renderer::renderResultsListHeading().
- Renderer::renderResultsListSummary() made hookable.
- Better validation for Query object result handling for QuerySet.
- Issue where automatically generated descriptions were causing parsing errors.
- Issue where some search queries were not properly highlighted due to extra quotes.
- Issue where the "all" tab was sometimes displaying multiple result list.
- PHP8 notices caused by the Debugger in the module config screen.
- Layout issue in rendering group labels.
- Notice that was displayed before module config was initially saved.
- Query issue affecting group_by setting used on ProcessWire 3.0.158+.
- Grouping disabled by default; this wasn't supposed to be enabled by default.
- PHP8 deprecation notices regarding required parameters following optional parameters.
- Query issue introduced by 0.29.0 when using fulltext indexes and grouping.
- Support for ordering search results by the indexed templates setting. Sort setting needs to include
_indexed_templates
in order for this feature to kick in. - Support for pinning specific templates at the top of results list by specifying "pinned_templates" (array) as part of the $args argument for Finder::find($query, $args) or SearchEngine::find($query, $args).
- Support for grouping search results by template. By default all templates with matches will be used for grouping, but you can provide your own array of templates via the
group_by
setting infind_args
. - Support for grouping rendered search results by most page values. By default results are not grouped, but you can provide the group property via the
results_grouped_by
setting inrender_args
. - New QuerySet object for representing queries with multiple sets of database query objects and/or results, such as those resulting from a find operation where results are grouped by templates.
- New QueryBase base class for Query/QuerySet.
- Tab support for front-end result rendering.
- Query object results and all properties based on results are lazy loaded by default, fetched when first accessed.
- SearchEngine front-end JavaScript files are now bundled with Parcel.
- Fixed an issue where recreating entire index wasn't working due to wrong variable name in Indexer::indexPages() method.
- Support for Indexer actions, the first one of which adds support for rendering FormBuilder forms as part of the search index. This feature is currently considered experimental.
- Option to specify custom path for front-end themes via the Advanced settings section in module config.
- EditorConfig (.editorconfig) and ESLint (.eslintrc.json) config files for defining coding style for IDEs.
- Support for collapsible content blocks in Debugger.
- Indexed templates option in module config is now AsmSelect, which makes it possible to organize indexed templates by preferred priority.
- Query class converts lesser than and greater than to HTML entities to allow matching said entities, as well as encoded HTML markup.
- All Debugger CSS classes refactored to follow
.pwse-
format.
- Fixed an issue where Debugger was displaying a notice due to missing returnAllCols argument for PageFinder::getQuery().
- Page ID and name made available as indexed field options in module configuration.
- Various changes to metadata processing: better support for nested data structures and better support for finding results based on things such as page ref values.
- Fixed an issue where file/image fields could sometimes return singular value, resulting in errors during indexing.
- SearchEngine::initOnce() is now a public method just in case that the module needs to be initialized from the outside.
- SearchEngine::savedPageIndex() gets called also when indexing multiple pages.
- Config screen error affecting ProcessWire versions < 3.0.160.
- Support for new text search selector operators added in ProcessWire 3.0.160.
- New JavaScript class for configuration screen features (PWSE_Config).
- Support for automatically generating result descriptions from indexed content by specifying _auto_desc as field name. Note that this is considered beta; be sure to read the "automatically generating search result descriptions" notes from the README!
- Multi-language support for Debugger.
- Various minor upgrades and optimizations.
- Debugger::getDebugContainer() renamed as Debugger::renderDebugContainer().
- Minor issue where search result description highlighting didn't work properly if the hit was at the very beginning of the description.
- Notices during debugging when using Query::getSQL().
- Potential issue where Indexer::indexPage() could fail when index field is multi-lingual and page being indexed had output formatting enabled.
- Improved indexing for FieldtypeOptions.
- getSQL() method and sql property for the Query class.
- Display resulting SQL when debugging queries (as a superuser in the module config screen).
- Enable reindexing the Page object currently being debugged with a single button click.
- PWSE_Core JavaScript class (window.SearchEngine) as a basis for a work-in-progress JS API.
- Debugger JavaScript features converted from a jQuery script to vanilla JS (PWSE_Debugger class).
- Debugger PHP AJAX API endpoint moved from Config to Debugger.
- New Debugger class and ability to trigger Debugger from module config screen (superusers only).
- Minor inconsistency in Query class, where result/total counters returned empty strings instead of integer 0 for zero results.
- New hookable method SearchEngine::savedPageIndex(Page $page).
- New args (array) param for Indexer::indexPage() and args (array) + save (bool) params for Indexer::indexPages().
- Both Indexer::indexPage() and Indexer::indexPages() can now optionally return the index itself as an array.
- Attempt to fix an issue causing errors with some RepeaterMatrix + FieldsetPage combinations.
- Minor optimizations for Indexer.
- Make Processor::processIndex() method public.
- Minor code cleanup here and there.
- Split processing methods from Indexer to a new Processor class.
- Added support for Fieldset (Page).
- New argument 'no_validate' for the Query class. Setting this as true skips query param validation.
- Results list no longer needs to be rendered before search form in order to prepopulate form input value.
- Added support for ProFields: Textareas.
- Improved the readability of the search index.
- Make sure that hidden or unpublished Repeater or PageTable items are skipped while building the index.
- Properly index values for single value Page reference fields.
- A potential Indexer UTF-8 PCRE issue occurring on macOS environments.
- Added support for ProFields: Table.
- Module config setting for selecting the operator used for finding content.
- Updated tools for configuring the module either via module config or site config.
- Minor improvements to the Renderer class.
- Reorganized the Config class structure.
- An issue affecting MySQL InnoDB full text searches.
- New module config setting for selecting indexed templates. This is essentially a shortcut for adding/removing index field to/from templates.
- If $index_field_name for SearchEngine::getIndexField($index_field_name) is null, use default name from options.
- Display additions and removals in module config screen when compatible fieldtypes have been modified.
- Adjustments to MarkupPagerNav default settings and the default theme for a more generic layout.
- Added the missing error description for when the query is empty.
- New validations for index field for module config screen, and an option for automatically creating the index field.
- An issue where module config screen wasn't detecting FieldtypeTextareaLanguage as a valid index field type.
- Potential conflicts with SearchEngine classes.
- Support for indexing multilanguage content (language support).
- An issue preventing File and Image field descriptions getting indexed.
- Index value gets saved in Pages::savedPageOrField instead of Pages::saved.
- Support for indexing Page Reference fields.
- Support for indexing non-field Page properties (id, name).
- New hookable method Indexer::___getPageReferenceIndexValue().
- Index value gets saved in Pages::saved instead of Pages::saveReady so that we can avoid messing with the regular save process.
- The "save" behaviour of the Indexer::indexPage() method.
- Small typo in module settings.
- New Renderer::___renderResultsJSON() method for rendering search results as a JSON string.
- Additional CSS rules to make sure that visited links appear correctly in the default output.
- Clear the "what" array if the first param for Renderer::render() is an array of arguments.
- Added new "pass through" rules (__call()) to the module for Indexer::index* methods.
- PHPDoc @method tags to the module for additional methods available via the __call() magic method.
- Revert earlier info JSON file format change.
- Changed SearchEngine.info.json format as an attempt to make the Modules directory read it properly.
- Handle multiple space-separated classes properly in parent placeholders.
- Accessing non-hookable Renderer methods via the SearchEngine module.
- Support for parent placeholders in render args class names.
- Changed default render args class names to use parent placeholders.
- Added new SearchEngine::setOptions() method to override previously defined runtime options.
- An issue where search result links and paths were wrong on subdirectory installs.
- Changed ProcessWire version requirement in composer.json to match the version defined in the module info JSON file.
- Translatable default strings are defined run-time in SearchEngine::getDefaultStrings(), which resolves various issues related to language detection.
- SearchEngine::getModuleConfigInputfields() was passing an extraneous options array to Config::__construct().
- Unless an overriding selector has been provided, Indexer::indexPages() now processes all non-trashed pages. Previously hidden or unpublished pages were not included.
- Display a warning message for cases where manual indexing doesn't find any pages to index.
- Avoid warnings caused by type declarations differing from those specified by the parent class.
- Added support for theme-specific config files. See README for more details.
- Breaking issues introduced with last minute changes to 0.4.0.
- New Renderer class for rendering a search form and/or a list of search results.
- New Data class to serve as a wrapper for WireData with improved getDot() support.
- SearchEngine::render*() methods matching each render-prefixed method in Renderer.
- Default selector operator changed from
%=
to*=
.
- Correctly identify FieldtypeRepeaterMatrix as one of the repeatable fieldtypes.
- Content from repeatable fields is only indexed if the parent field is included in the indexed_fields array.
- README updates.
- New Indexer::___getIndexValue and Indexer::___getRepeatableIndexValue methods.
- Changed 'link_prefix' option to 'link' item in 'prefixes' array.
- Improved indexing for file and image fields (FieldtypeFile).
- Changed default sort value for Finder::find() to 'sort'.
- Documented available find args in the README file.
- Finder, Query, and Base classes, new SearchEngine::find() method.
- Loads of behind the scenes changes to the codebase.
- Improvements and additions to the README file.
- Initial version of the module.