Re: REST: Filtering of items (e.g. issues)

Ralf Schlatterbeck <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
On Thu, Mar 21, 2019 at 06:47:39PM +0100, Ralf Schlatterbeck wrote:
> The REST API currently allows searching via where_XXX parameters, where
> the XXX is a field name. Unfortunately it allows only searching for
> classes with a key-property where we can do a lookup, so 
...
> To sum up, the feature is currently broken.

This is now fixed, searching works for all Link/Multilink properties,
strings, numbers, dates,... in the syntax supported by hyperdb.filter.

> I'd like to remove the where_ string and use the names of the properties
> directly, e.g.
> 
> .../data/issue?status=open&nosy=schlatterbeck

This was also done.
Note that pagination now uses @page_size and @page_index (leading '@')
parameters.

Still Open: Do we want an option to search for strings with an exact
match?

> Concerning the string search: We could extend the filter API to allow
> exact string matches. That leaves open the question if we want to be
> able to expose the current behavior, too (searching for substrings) and
> how to syntactically express this in the REST parameters.
> 
> If we implement the substring search now as in roundups filter call I
> fear we will be stuck with that behaviour for all times. On the other
> hand searching for substrings would be a nice feature.
> 
> Maybe non-substring search (exact match) could be indicated by an
> initial '=', e.g.
> 
> /data/issue?title==This is a test
> 
> would search for issues where the title is exactly as given. This
> however would preclude searching for substrings with an embedded '=' at
> the start.

Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   http://www.runtux.com
Reichergasse 131, A-3411 Weidling       email: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.