aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-08-18 12:06:31 +0200
committerGravatar GitHub <noreply@github.com> 2022-08-18 12:06:31 +0200
commit4f111c5b305078a641d13ac41ce7d798e3cc19ce (patch)
treeeff91f43111d31fb8c6837fa084a2debd9407e57 /tests
parent2acf3a4dd87af5c09fcf513517cb852ff6e909ce (diff)
Easier full-text search possibility (#4505)
* Easier full-text search possibility Contributes to https://github.com/FreshRSS/FreshRSS/issues/1331 Avoid concats in searches to make text indexes easier to build * Fix tests * Documentation
Diffstat (limited to 'tests')
-rw-r--r--tests/app/Models/SearchTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php
index 3fb5a144f..a2832c710 100644
--- a/tests/app/Models/SearchTest.php
+++ b/tests/app/Models/SearchTest.php
@@ -318,17 +318,17 @@ class SearchTest extends PHPUnit\Framework\TestCase {
],
[
'#tag Hello OR (author:Alice inurl:example) OR (f:3 intitle:World) OR L:12',
- ' ((e.tags LIKE ? AND e.title||e.content LIKE ? )) OR ((e.author LIKE ? AND e.link||e.guid LIKE ? )) OR' .
+ ' ((e.tags LIKE ? AND (e.title LIKE ? OR e.content LIKE ?) )) OR ((e.author LIKE ? AND e.link LIKE ? )) OR' .
' ((e.id_feed IN (?) AND e.title LIKE ? )) OR ((e.id IN (SELECT et.id_entry FROM `_entrytag` et WHERE et.id_tag IN (?)) )) ',
- ['%tag%','%Hello%','%Alice%','%example%','3','%World%', '12']
+ ['%tag%','%Hello%', '%Hello%', '%Alice%', '%example%', '3', '%World%', '12']
],
[
'#tag Hello (author:Alice inurl:example) (f:3 intitle:World) label:Bleu',
- ' ((e.tags LIKE ? AND e.title||e.content LIKE ? )) AND' .
- ' ((e.author LIKE ? AND e.link||e.guid LIKE ? )) AND' .
+ ' ((e.tags LIKE ? AND (e.title LIKE ? OR e.content LIKE ?) )) AND' .
+ ' ((e.author LIKE ? AND e.link LIKE ? )) AND' .
' ((e.id_feed IN (?) AND e.title LIKE ? )) AND' .
' ((e.id IN (SELECT et.id_entry FROM `_entrytag` et, `_tag` t WHERE et.id_tag = t.id AND t.name IN (?)) )) ',
- ['%tag%','%Hello%','%Alice%','%example%','3','%World%', 'Bleu']
+ ['%tag%', '%Hello%', '%Hello%', '%Alice%', '%example%', '3', '%World%', 'Bleu']
],
[
'!((author:Alice intitle:hello) OR (author:Bob intitle:world))',