I get different search behavior between back-end and API.
Following request is replayed with curl (logged from Android app):

$ curl -d '{“excerpt_length”:“256”,“op”:“getHeadlines”,“search_mode”:"",“offset”:“0”,“view_mode”:“all_articles”,“skip”:“0”,“match_on”:“both”,“sid”:“xxxxxxxxx”,“feed_id”:"-4",“include_nested”:“true”,“search”:“Crusader Kings”,“show_content”:“true”,“show_excerpt”:“true”,“limit”:“15”,“order_by”:“default”,“has_sandbox”:“true”,“include_attachments”:“true”,“include_header”:“true”} ’ mywebsite

Returns 0 results :
{“seq”:0,“status”:0,“content”:[{“id”:-4,“first_id”:0,“is_cat”:false},[]]}

However, I get many results using webui. Following request is sent to backend.php :

{
“op”: “feeds”,
“method”: “view”,
“feed”: “-4”,
“view_mode”: “all_articles”,
“order_by”: “default”,
“query”: “Crusader+Kings”,
“search_language”: “Simple”,
“m”: “ForceUpdate”,
“cat”: “false”,
“csrf_token”: “xxxx”
}

I can’t see what explains this behavior, all searches are done on “All articles” (feed id -4).
Search is not fully broken on API, as it returns results on some other keywords.

tt-rss version (including git commit id):
20.09-486f1d84e

Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:
Arch Linux 5.4.59-1-lts, PHP Version 7.4.9, PostgreSQL 12.3

i rarely use search on android but it’s surprising that there’s a discrepancy in search results because it’s all generated by a single function, both for api and the web ui.

one thing that stands out is this:

api doesn’t pass search language to backend so it defaults to “english” which may somehow affect this, or not. to eliminate this possibility you can try setting search language to English in preferences.

other than that i don’t have any ideas at the moment.

Thanks for support !
Indeed, by patching line 2131 classes/feeds.php to set default search language to “simple”, I get same results as webui on Android app.
Is adding “search language” parameter on API planned ?

this shouldn’t be hard to add to the API specifically, android app would be more complicated.

regardless of the API search should fallback to user preference if language is not explicitly given instead of English being hardcoded. that should ensure consistency with web ui, at least. and it’s a lot easier to fix.

i’ll make a note to take a look at this tomorrow.

https://git.tt-rss.org/fox/tt-rss/commit/71e9f70b8a5fa128204eb4a47c06639206824500

this removes hardcoded english and falls back to language configured by user instead