Commit Graph

15 Commits

Author SHA1 Message Date
Alexandre Alapetite
ae70374b03 Filter by multiple feed IDs (#2892)
Add the possibility to filter by feed ID like `f:123 more-search`
or multiple feed IDs, like `f:123,234,345 more-search` or an exclusion
like `!f:456,789 more-search`
2020-04-17 10:57:35 +02:00
Alexandre Alapetite
61c8026ac9 Implement negation for searching by date intervals (#2869)
* Implement negation for searching by date intervals

#fix https://github.com/FreshRSS/FreshRSS/issues/2866
Allow searching for e.g. `!date:P1W` to exlude all articles newer than
one week.
More generally, allows exclusion on some date intervals.

* Fix OR
2020-04-01 17:26:19 +02:00
Alexandre Alapetite
b672fc190d Tweaks for Vienna RSS (#2093)
* Tweaks for Vienna RSS

https://github.com/FreshRSS/FreshRSS/issues/2091
https://github.com/ViennaRSS/vienna-rss/issues/1197

* Fix get feed by URL

* Fix get item ids returning starred elements

* API add item ids by feed URL

* Add API filter `it`

https://feedhq.readthedocs.io/en/latest/api/reference.html#stream-items-ids

* API add `nt=` filter + refactoring

* No ; prefix for author

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435562495

* Add id long form prefix and accept short id form

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435631259

* Fix quote problem

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435683930

* Isolate bug fix for News+

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435687041

* Rework encoding conventions

https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-437441834

* Unicode escaping alternative

Alternative approach to encode XML special characters and other
problematic characters into their Unicode fullwidth version when we
cannot use HTML-encoding because clients disagree wether they should
HTML-decode or not.
https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-436059559
2018-11-11 17:31:50 +01:00
Alexandre Alapetite
b323ed0846 Improve authors (#2025)
* Links for authors and multiple authors

Favour ';' as a separator instead of ',' to better cope with
multi-author scientific articles.
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/1997 ,
https://github.com/FreshRSS/FreshRSS/issues/1968,
https://github.com/FreshRSS/FreshRSS/pull/2023

* Change i18n authors

* Update layout

* Unicode-compatible search

Example for `author:Loïc`

* author <em> styling

* Final details

* Minor spacing
2018-09-16 10:46:27 +02:00
Alexandre Alapetite
af27b6d300 Tags split improvement (#2023)
* Tags split improvement

Some feeds use a single category with comma-separated tags.
Better handling of tags containing a space

* Handle spaces in searches with +

Can now search in tags containing spaces

* Fix searches with spaces for title and author
2018-09-15 13:06:29 +02:00
Alexandre Alapetite
3011bbc5e1 Search allow double quotes
`author:"some name"`
2017-04-02 11:55:20 +02:00
Alexandre Alapetite
aadba9fb70 Negative searches
https://github.com/FreshRSS/FreshRSS/issues/1381
Possibility to exclude authors, titles, tags, urls, words by prefixing
them by ! or - (like Google Search):

* !intitle:unwanted
* -intitle:unwanted
* -author:unwanted
* -#unwanted
* -unwanted

And one can use many of each and combine them with positive searches
2017-04-01 23:41:19 +02:00
Alexandre Alapetite
d9c0d25b85 Improve search: intitle, author, inurl
Allow multiple values of intitle: , author:, inurl:

Note: Tests for UserQueryTest are broken due to
https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-4.0.0#backwards-compatibility-issues
2017-04-01 22:31:12 +02:00
Alexis Degrugillier
d229216ccc Split the search into values
Before, the search was a single value.
Now it is splited in chuncks when separated by spaces.
Except if they are enclosed by single quotes or double quotes.

For some reasons, the unit tests are working for both single and double quotes but the
search box isn't. It is working only with single quotes.
We need to investigate the reason of this behavior.

See #823
2015-04-22 00:24:22 -04:00
Alexis Degrugillier
74c020edc8 Add a default string representation
In some part of the code, the search is displayed as is and crash since there is no way to display the search object as a string.
2015-02-21 09:47:40 -05:00
Alexis Degrugillier
50b6a02578 Add search default raw value
Before, the default value was undefined. Now it always has a value even when no value is provided.
2015-02-21 09:46:25 -05:00
Alexis Degrugillier
f5028d30d0 Add required library
The lib_date.php library was missing in the Search object file. It is required to make date conversion in that object.
2015-02-21 09:45:19 -05:00
Alexis Degrugillier
9f83aa5fe7 Refactor the code to make less unnecessaty calls
There were multiple calls made to the cleaning method that were unnecessary since it is useful only on the last call.
It allows to simplify code by returning values ealier.
2015-02-12 21:05:33 -05:00
Alexis Degrugillier
9cee5c1a17 Remove code generated by netbeans 2015-02-11 21:52:10 -05:00
Alexis Degrugillier
f30ded2f86 Extract the search code from the context
I figured that the code for the search could be extracted from the context to have separation of concern.
It supports multiple keywords. It suports also multiple tag keywords.
2015-02-11 21:49:21 -05:00