Closed codegold79 closed 3 years ago
fulltext
in MySQL:like
, such as excluding English words automatically (e.g. the
).fulltext
is faster than like
, especially with several like
statements union
'd together. The main tradeoff is space. See This StackOverflow question.fulltext
is a form of indexing that stores the existence of certain words in certain posts, along with their locations and frequencies. Indexing cannot improve the performance of %like
or %like%
statements, but could improve the performance of like%
statements. fulltext
uses around 65% of the data that it indexes. It is highly dependent on the number of words separated by whitespace. See this StackOverflow question.fulltext
column (or index) for body and another column for the title. fulltext
column whenever. It is automatically calculated.like
is both slower and produces worse results, while fulltext
just costs more space.fulltext
is the best option 95% of the time.cc @daved @codegold79: What do y'all think?
Currently, even if a user sends in multiple keywords to find a post, only the first keyword will be used to search for a post. Be able to query for more than one keyword.
Be sure to search the keywords in both the post title and body.
A/C