MySQL full text search equivalents to Google search: Difference between revisions

Jump to navigation Jump to search
Line 29: Line 29:
== Ignore special characters ==
== Ignore special characters ==
Ignore return symbol and {{kbd | key = <nowiki>span</nowiki>}} tag
Ignore return symbol and {{kbd | key = <nowiki>span</nowiki>}} tag
* Searched the keywords e.g. {{kbd | key = <nowiki>"意法" site:ptt.cc</nowiki>}} on Google and found the search result contains 意 & 法 located in the nearest but different rows. 意 is at the end of the n-th row. 法 is at the beginning of n+1-th row [https://www.ptt.cc/man/Learn_Buddha/D7D5/D575/DFD/D15C/M.1317265764.A.B7D.html].
* Example:
** Searched the keywords e.g. {{kbd | key = <nowiki>"意法" site:ptt.cc</nowiki>}} on Google and found the search result contains 意 & 法 located in the nearest but different rows. 意 is at the end of the n-th row. 法 is at the beginning of n+1-th row [https://www.ptt.cc/man/Learn_Buddha/D7D5/D575/DFD/D15C/M.1317265764.A.B7D.html].
* Approach: (1) remove the html tag (2) remove the return symbol ([https://en.wikipedia.org/wiki/Carriage_return Carriage return]).


Ignore space, [https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms Halfwidth and fullwidth symbol] (半形字元和全形字元)
Ignore space, [https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms Halfwidth and fullwidth symbol] (半形字元和全形字元)
* Searched the keywords e.g. {{kbd | key = <nowiki>"嗎有"</nowiki>}} on Google and found the search result contains {{kbd | key = <nowiki>嗎? 有</nowiki>}} & {{kbd | key = <nowiki>嗎- 有</nowiki>}}.
* Examples:
* Searched the keywords e.g. {{kbd | key = <nowiki>"人物誌Persona"</nowiki>}} on Google and found the search result contains {{kbd | key = <nowiki>人物誌(Persona)</nowiki>}}, {{kbd | key = <nowiki>人物誌(Persona) </nowiki>}} &  {{kbd | key =<nowiki>「人物誌」(persona)</nowiki>}}.
** Searched the keywords e.g. {{kbd | key = <nowiki>"嗎有"</nowiki>}} on Google and found the search result contains {{kbd | key = <nowiki>嗎? 有</nowiki>}} & {{kbd | key = <nowiki>嗎- 有</nowiki>}}.
** Searched the keywords e.g. {{kbd | key = <nowiki>"人物誌Persona"</nowiki>}} on Google and found the search result contains {{kbd | key = <nowiki>人物誌(Persona)</nowiki>}}, {{kbd | key = <nowiki>人物誌(Persona) </nowiki>}} &  {{kbd | key =<nowiki>「人物誌」(persona)</nowiki>}}.
* Approach: (1) remove the space symbol (2) remove the Halfwidth and fullwidth symbol.


== Highlight search query keywords on resulting pages ==
== Highlight search query keywords on resulting pages ==

Navigation menu