Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Confusion on Full Text Searching

Confusion on Full Text Searching

Scheduled Pinned Locked Moved Database
databasesql-serversysadminalgorithmshelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brendan Vogt
    wrote on last edited by
    #1

    Hi, I am using SQL Server 2005. I need to implement a full text search capability. I decided to use CONTAINS, and not sure if it is the correct statement to use. If the user types in word1 word2 in the search textbox, how would I send this to the CONTAINS statement? Something like word1 OR word2? What happens if he tries to search via phrase? Please can someone help? Regards Brendan

    L 1 Reply Last reply
    0
    • B Brendan Vogt

      Hi, I am using SQL Server 2005. I need to implement a full text search capability. I decided to use CONTAINS, and not sure if it is the correct statement to use. If the user types in word1 word2 in the search textbox, how would I send this to the CONTAINS statement? Something like word1 OR word2? What happens if he tries to search via phrase? Please can someone help? Regards Brendan

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You can use the CONTAINS-statement to search for pieces of text. It's not very usefull if you want to search for multiple parts; you'd have to check each text-column in each table for each word that the user types. Short example, we search our db for the text "Hello world". Now, what should happen if table A holds this exact string, and table B has a text-field that starts with the word "World" and ends with the words "Hello, hello!"? Worse, what happens when the user searches for the text "This is the world?" Would it find both records, or would it show those records that have the most occurences of the word "the"? These noise-words should be filtered to ensure relevant results. All in all, FTS[^] isn't just a query you implement (although that can be starting-point for building your own), and most people that are using SQL Server resort to the text-indexing service of MSSQL[^]. You could also consider Lucene[^], there are some articles here[^] on CP on integrating it into your application. Good luck :)

      I are troll :)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups