Commit graph

32 commits

Author SHA1 Message Date
Brian Huisman 47562e0a71 Add 'online' value for Mustache template
Provide an 'online' value to the Search Result Mustache template. This will, for example, allow you to put things in your Search Result template that will show up when your site is displayed live (PHP), but will not be output when your site is displayed using the offline Javascript, and vice versa.

eg.
{{#online}}
  This will only display in your template if it's online.
{{/online}}
{{^online}}
  This will only display in your template it it's offline.
{{/online}}
2023-06-22 09:57:33 -04:00
Brian Huisman 54bbbb6a65 Log clicked search suggestions
If the search UI is using typeahead and the user selects a suggested option to go right to a page, then a search is never logged as a search query; it's like the search never happened. Add a fetch request to log the search query just before sending the user on their way to the page.
2023-06-16 14:38:24 -04:00
Brian Huisman e76fdf730c s_show_orphans cleanup
Make 's_show_orphans' a runtime variable and normalize the SQL queries it's used in.
Also change generic '$select' variable to more semantic '$crawldata'.
2023-06-15 10:19:05 -04:00
Brian Huisman 563eb6d014 Query log fixes, multibyte search restrict
Get rid of "avg_results" value; it's not intuitive. Instead make sure to use the results tally from the last recorded search query.
Use mb_strlen and mb_substr to avoid searching for single, but multibyte characters like bullet (•).
2023-06-07 11:45:14 -04:00
Brian Huisman b9d0ff1665 Update search.php
Using INSTR was correctly matching searches for 'ae' to the ligature æ, but was not matching searches for plain 'a' to å. However, using LIKE behaves exactly the opposite of this. Unless there is a better solution, use both INSTR and LIKE to create the query so all bases are covered.
2023-06-07 08:52:59 -04:00
Brian Huisman 06c66f214a Update search.php
Update to match similar cancel code in crawler.php.
Fix $reason typo.
2023-05-19 13:16:45 -04:00
Brian Huisman 0728849ea4 Update search.php
Ensure that important or negative match strings are not empty.
2023-05-19 12:22:21 -04:00
Brian Huisman f55f9e71b3 Use <mark> instead of <strong>
Also make it easier for a savvy user to use whatever HTML element they like for highlighting.
2023-05-17 14:21:37 -04:00
Brian Huisman 0f7ea69790 Store s_weights as JSON 2023-05-17 09:22:00 -04:00
Brian Huisman d8e9d5dc91 Admin UI edits for when crawl is in progress
Automatically encode/decode json when saving/reading ODATA config values.
Remove 'sp_links_crawled' config table value, now stored in 'sp_progress'.
Update Crawl Information window in real-time while crawler is running. Be more aggressive at reloading the page to get the latest data once a crawl has finished.
Time the setting of certain config values while crawling in a more sensible way.
2023-05-16 12:00:28 -04:00
Brian Huisman 4bb28031b6 Enable downloading Page Index
Allow downloading of the page index as a csv.
Remove unnecessary database columns url_base and status_noindex
Store list of domains at crawl so we don't need to request them every page-load; you will need to reinstall fresh because of this change
2023-05-12 10:06:57 -04:00
Brian Huisman 8a8623b440 Update config.php
Preliminary code to check for DB version
2023-05-05 12:58:28 -04:00
Brian Huisman 803155547d Rename to sp_punct
Rename sp_smart ("smart" punctuation) to the more general and accurate sp_punct
2023-05-05 11:54:07 -04:00
Brian Huisman 635422b1d6 Punctuation normalization and MIME-type display
Disable Query log download button if query log is empty.
Further database error resiliency.
Add many more punctuation normalization characters; normalize on search as well as storage.
Add count of MIME-types in Search Management UI.
2023-05-05 11:17:39 -04:00
Brian Huisman ba04173c29 Daily updates
Keep Page Index pagination page within limits; add UTF-8 BOM to CSV and TXT download output; use utf8mb4_unicode_520_ci collation to remove need for SQL REGEXP; add more latin accent equivalent characters.
2023-04-26 15:16:13 -04:00
Brian Huisman b3b40a9194 Implement filetype: searching 2023-04-24 16:31:27 -04:00
Brian Huisman 150f98883d $_SDATA['pages'] is always at least 1 2023-04-24 13:37:44 -04:00
Brian Huisman 0a1c1a52e1 Search for latin accents explicitly via SQL REGEXP 2023-04-24 13:04:44 -04:00
Brian Huisman 8edc94b550 Allow search.php to unstick stuck crawls 2023-04-24 10:42:29 -04:00
Brian Huisman 0f69a2d2c8 Enable ligature / alternate-spelling matching 2023-04-24 09:52:05 -04:00
Brian Huisman fed2b979e1 Add query length limit option 2023-04-22 21:48:43 -04:00
Brian Huisman 47e0173a1d Maybe let Mustache do the work here 2023-04-20 16:18:51 -04:00
Brian Huisman 2013f64a39 Use raw title for JSON (typeahead) output 2023-04-20 16:11:56 -04:00
Brian Huisman cac7e90930 Change $_TEMPLATE to $_ORCINUS 2023-04-20 11:03:08 -04:00
Brian Huisman 84e38a5663 Re-upload 3rd party libraries 2023-04-20 10:47:11 -04:00
Brian Huisman 1363370840 Fix for dynamic classes deprecation in PHP 8.2 2023-04-19 11:50:48 -04:00
Brian Huisman ec2b7aa075 Daily updates, big flow change in crawler.php 2023-04-18 17:20:27 -04:00
Brian Huisman 553fc019fe Daily update 2023-04-17 17:47:22 -04:00
Brian Huisman 17fa8fae05 Tighten up file headings 2023-04-13 08:27:41 -04:00
Brian Huisman 062f009829 Updates for the day 2023-04-12 19:08:00 -04:00
Brian Huisman 595740962e Update name to Orcinus 2023-04-12 08:28:29 -04:00
Brian Huisman bffa144421 move os3/ to orcinus/ 2023-04-12 08:08:11 -04:00
Renamed from os3/search.php (Browse further)