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. Full Text Search Query Weird Results

Full Text Search Query Weird Results

Scheduled Pinned Locked Moved Database
databasehelp
6 Posts 3 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, When I run the following query I get results: SELECT * FROM tblMyFullTextSearchTable WHERE FREETEXT(fldMyTitle, 'religion'); ..but when I run the following query, I get no results: SELECT * FROM tblMyFullTextSearchTable WHERE FREETEXT(fldMyTitle, 'the'); I know for a fact there are titles with the word the in it. Please help. Regards ma se

    S V 2 Replies Last reply
    0
    • B Brendan Vogt

      Hi, When I run the following query I get results: SELECT * FROM tblMyFullTextSearchTable WHERE FREETEXT(fldMyTitle, 'religion'); ..but when I run the following query, I get no results: SELECT * FROM tblMyFullTextSearchTable WHERE FREETEXT(fldMyTitle, 'the'); I know for a fact there are titles with the word the in it. Please help. Regards ma se

      S Offline
      S Offline
      Stathread
      wrote on last edited by
      #2

      Try CONTAINS. SELECT * FROM tblMyFullTextSearchTable WHERE CONTAINS(fldMyTitle, 'the');

      B 1 Reply Last reply
      0
      • B Brendan Vogt

        Hi, When I run the following query I get results: SELECT * FROM tblMyFullTextSearchTable WHERE FREETEXT(fldMyTitle, 'religion'); ..but when I run the following query, I get no results: SELECT * FROM tblMyFullTextSearchTable WHERE FREETEXT(fldMyTitle, 'the'); I know for a fact there are titles with the word the in it. Please help. Regards ma se

        V Offline
        V Offline
        Vinay Dornala
        wrote on last edited by
        #3

        hi i Hope this mail will help u little bit. FREETEXT: Is a predicate used to search columns containing character-based data types for values that match the meaning and not the exact wording of the words in the search condition. When FREETEXT is used, the full-text query engine internally "word-breaks" the freetext_string into a number of search terms and assigns each term a weight and then finds the matches The following example searches for all documents containing the words related to vital, safety, components. SELECT Title FROM Production.Document WHERE FREETEXT (Document, 'vital safety components' ); I think contions will give u r result contains can use in this cases. A word or phrase. The prefix of a word or phrase. A word near another word. A word inflectionally generated from another (for example, the word "drive" is the inflectional stem of drives, drove, driving, and driven). A word that has a higher designated weighting than another word. Syntax regards, .Net professional

        B S 2 Replies Last reply
        0
        • V Vinay Dornala

          hi i Hope this mail will help u little bit. FREETEXT: Is a predicate used to search columns containing character-based data types for values that match the meaning and not the exact wording of the words in the search condition. When FREETEXT is used, the full-text query engine internally "word-breaks" the freetext_string into a number of search terms and assigns each term a weight and then finds the matches The following example searches for all documents containing the words related to vital, safety, components. SELECT Title FROM Production.Document WHERE FREETEXT (Document, 'vital safety components' ); I think contions will give u r result contains can use in this cases. A word or phrase. The prefix of a word or phrase. A word near another word. A word inflectionally generated from another (for example, the word "drive" is the inflectional stem of drives, drove, driving, and driven). A word that has a higher designated weighting than another word. Syntax regards, .Net professional

          B Offline
          B Offline
          Brendan Vogt
          wrote on last edited by
          #4

          Thanks, but I have another scenario: I am using SQL Server 2005, and I have set up a full text search on my products table. I am using ASP.NET 1.1. In my search.aspx page I have 4 textboxes used in the search. But only one of the textboxes are required for the search. I'm not sure hot to construct my SELECT statement based on the given criteria because some of the textboxes can be blank. I have a title textbox where the user can type a couple of words that he wants to find in the book's title. How do I specify this in the SELECT clause, as it will not be an exact match, but a combination of words in the title. I would appreciated it if someone could get back to me. Regards ma se

          1 Reply Last reply
          0
          • S Stathread

            Try CONTAINS. SELECT * FROM tblMyFullTextSearchTable WHERE CONTAINS(fldMyTitle, 'the');

            B Offline
            B Offline
            Brendan Vogt
            wrote on last edited by
            #5

            This doesn't work either. SELECT * FROM tblMyFullTextSearchTable WHERE CONTAINS(fldMyTitle, ' "the" OR "and" '); What I am trying to achieve is what ever words are passed through, I need to search on it. So if I were to pass through the word "a" or "an" or "the" I need it to bring back data that contains these words. Regards ma se

            1 Reply Last reply
            0
            • V Vinay Dornala

              hi i Hope this mail will help u little bit. FREETEXT: Is a predicate used to search columns containing character-based data types for values that match the meaning and not the exact wording of the words in the search condition. When FREETEXT is used, the full-text query engine internally "word-breaks" the freetext_string into a number of search terms and assigns each term a weight and then finds the matches The following example searches for all documents containing the words related to vital, safety, components. SELECT Title FROM Production.Document WHERE FREETEXT (Document, 'vital safety components' ); I think contions will give u r result contains can use in this cases. A word or phrase. The prefix of a word or phrase. A word near another word. A word inflectionally generated from another (for example, the word "drive" is the inflectional stem of drives, drove, driving, and driven). A word that has a higher designated weighting than another word. Syntax regards, .Net professional

              S Offline
              S Offline
              Stathread
              wrote on last edited by
              #6

              ??? SELECT Title FROM Production.Document WHERE Document LIKE '%vital safety components%'

              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