Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[MySQL] Fulltext Wildcards

  1. Jun 25, 2004 #1

    dduardo

    User Avatar
    Staff Emeritus

    Do you guys know if it is possible to use pre-appended wildcards when doing a fulltext search? Is there a workaround that I could possibly use? I've read through the documentation and it seems as if you can only do appended wildcards. Here is my query:

    Code (Text):
    $query = "SELECT title, MATCH (title) AGAINST ('" . $search . "' IN BOOLEAN MODE) AS relevance FROM descriptions WHERE MATCH (title)  AGAINST ('" . $search . "*' IN BOOLEAN MODE) ORDER BY relevance DESC"
    I know I can use LIKE with % on both ends of each word, but I need the ability to use boolean operators for advanced searching and have my query sorted by relevance.
     
    Last edited: Jun 25, 2004
  2. jcsd
  3. Jun 25, 2004 #2

    dduardo

    User Avatar
    Staff Emeritus

    Ok, I just talked to some guys over at the mysql chatroom on freenode. They recommended writing my own search engine since fulltext is slow.

    If anyone has worked with databases before can you recommend an efficient indexing algorithms.
     
    Last edited: Jun 25, 2004
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: [MySQL] Fulltext Wildcards
Loading...