0

Hi there! I've been asked to explain some limitations that could have the operators (~, ~*, LIKE) when doing Full text limitation.

I've seen some things but nothing really relevant.

Could someone point out 2 or 3 limitations they have faced when using this operators for text search in PostgreSQL?

Many thanks!!

3
  • LIKE doesn't allow for handy things that POSIX regex has such as non-capturing groups, start/end string anchors ^ or $, and more. LIKE misses on a lot of the finer regex control that ~ and ~* offer. Additionally, regardless of using LIKE or the POSIX operators, if you start your comparison string with a wildcard (% or .* for example), it ignores indexes on the field being matched. Check out this documentation: postgresql.org/docs/14/functions-matching.html Commented May 10, 2022 at 18:42
  • You're welcome! As a bonus, this is an amazing resource but if you're interested on further reading on how pattern matching affects indexes, check this out: use-the-index-luke.com/sql/where-clause/searching-for-ranges/… Commented May 10, 2022 at 18:49
  • Your question is unclear. What limitation? Full text search is about finding whole words in natural language texts, not about pattern matching. Commented May 11, 2022 at 6:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.