Re: REST API: Sorting, wish-list

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
Hi Ralf:

In message <[email protected]>,
Ralf Schlatterbeck writes:
>On Sat, Aug 24, 2019 at 04:58:32PM +0200, Ralf Schlatterbeck wrote:
[...]
>> Substring search
>> ----------------
>> 
>> Currently strings do a substring-search. For an exact match we would
>> have to extend the 'filter' method of the database. This is (at least
>> for me) probably quite easy to do.
>> 
>> How would we change the syntax of the REST queries?
>> I'd suggest we change the semantics to do an exact match for
>> property=string searches, that leave us with the question how substring
>> search should be expressed.
>
>I've now implemented exact string search.
>For the filter method in Class, this just takes an additional dictionary
>named 'exact_match_spec' similar to the existing filterspec.
>
>In the REST-API I've adopted the following syntax:
>
>propname:=exact
>for the exact string search
>propname~=nonexact
>for the case-insensitive substring search
>
>The syntax with a single '=' still does the substring search as before.
>The same syntax can also be used for properties other than String, but
>makes no difference.
>
>The ':' *before* the '=' (and likewise the ~) was adopted because the
>form parse will put the ':' or '~' at the end of the property name. In
>this way we do not exclude certain strings from being searched. A
>special character *after* the '=' would have the drawback that this
>character could not start a string to be searched.
>
>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.

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?

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.

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.

Thoughts? Have a great day.

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
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.