Author Topic: Wildcards would be nice  (Read 4635 times)

Offline carlseibert

  • Full Member
  • ***
  • Posts: 168
    • View Profile
Wildcards would be nice
« on: May 10, 2019, 03:59:59 PM »
I tried a star. Didn't seem to do anything. I don't know if this is already on the roadmap or not.

The ability to use a trailing wildcard would largely make up for the lack of selectable pluralization, root search, name equivalency, and a bunch of other stuff that's basically out of the question in a desktop product.

Developers have told me that leading wildcards are way more costly than trailing ones. I won't shed any tears there. In English anyway, 95% of the utility would be in trailing ones.

Offline Bill Kelly

  • Software Developer
  • Full Member
  • ***
  • Posts: 131
    • View Profile
    • Camera Bits, Inc.
Re: Wildcards would be nice
« Reply #1 on: May 10, 2019, 05:17:13 PM »
Hi Carl,

Developers have told me that leading wildcards are way more costly than trailing ones.

Those are indeed the baseline constraints of traditional database indexes.

If there's good news, we've built a so-called "trigram"-based search index on top of that, which supports both leading and trailing wildcards efficiently.

However, this capability is perhaps not yet exposed to the query language in an ideal way.

Currently, unquoted terms implicitly behave as though they had both leading and trailing wildcards. Thus a search for 'vert' (without quotes) would find metadata like 'vertical' as well as 'advertisement'. Whereas surrounding the term in double-quotes, "vert", would find only an exact match.

We've discussed internally how this default behavior could produce unexpected results, and so this has been on our list to improve.

But: since the underlying support for wildcards is already there in the index, it should be possible to move toward more explicit support for wildcards in the query language (e.g. vert, *vert, vert*, *vert*) rather than having wildcarding occur by default.


Regards,

Bill

Offline carlseibert

  • Full Member
  • ***
  • Posts: 168
    • View Profile
Re: Wildcards would be nice
« Reply #2 on: May 12, 2019, 11:44:54 AM »
... and/or a "search only whole words" function.

And I agree. Double ticks for a phrase is pretty standard. But double ticks for a word is unexpected. That said, now that I know, I'm good. But I may not be your mainstream user. :-)