Re: REST API: Sorting, wish-list

Ralf Schlatterbeck <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
On Wed, Aug 28, 2019 at 09:14:11PM -0400, John P. Rouillard wrote:
> >Let me know what you think about the new syntax.
> 
> := looks like assignment to me, but I don't have a better alternative,
> so it works for me. I suspect I would not use ~= and just go with the
> = format.
Fine. The ~ looks too much like substring-search to me. So I've
implemented ~= as an alias for simple '='. So at some point we may want
to deprecate '=' for string search.

> Given the discussion about %SYS searching on the user's list, would
> extending it to a third form like *= to indicate search everything
> including non-word character strings be a reasonable idea?

The problem on the user list was searching '%SYS' in the fulltext
indexer. The indexer strips all non-alphanum chars afaik. So this will
never work with a new syntay unless the indexer is also changed.

For text searching, finding '%SYS' with a substring search should
already work (% is also used in SQL for the LIKE/ILIKE operators but
should be properly escaped, at least there is a regression test for
exactly this use-case). So I don't think we need another syntax.

> I think I remeber mentioning in an email that full text search over
> rest would be useful. I may have suggested @search=word as the
> mechanism.

Yes. This would involve a two-step process, first searching fulltext via
the indexer and the plugging the returned IDs into the usual filter call
as the first parameter.

> Then to search for %SYS, something like @search*=%SYS could be used.
> Maybe it couldbe implemented with a full text search for SYS then
> taking all the resulting messages and looking for %SYS. As any message
> that doesn't include SYS isn't going to include %SYS.

I think that fulltext searching such a short string would return a lot
of results. Better to plug the search directly into a String search --
if you know in which field it should be found. If it's in a message
contents, fulltext-search is the only option.

Also a nice day to you!
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.