• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

FullText Search - SQL Server

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    FullText Search - SQL Server

    Hello, can you help me as I am too stupid to figure this out for myself.

    I want to enable FullText search on a Text column. I have added a FullText catalog, and added the column to the catalog and populated the index.
    The FullText search service is running.

    However I get no hits. I should point out that StopWords is off.

    Soooo

    If my column contains 'Attrn' and I search on CONTAINS (MyColumn,'Att') I would expect to get a hit, but I don't.

    Are there any other bear traps I haven't considered?
    Knock first as I might be balancing my chakras.

    #2
    Have you tried using FREETEXT instead of CONTAINS?
    The greatest trick the devil ever pulled was convincing the world that he didn't exist

    Comment


      #3
      You mean apart from the fact that code is wrong......

      How do you get leading wildcard full-text searches to work in SQL Server? - Stack Overflow

      My invoice is in the post
      The Chunt of Chunts.

      Comment


        #4
        Originally posted by MrMarkyMark View Post
        You mean apart from the fact that code is wrong......

        How do you get leading wildcard full-text searches to work in SQL Server? - Stack Overflow

        My invoice is in the post
        You lost me. How is my code wrong?
        Knock first as I might be balancing my chakras.

        Comment


          #5
          Originally posted by suityou01 View Post
          You lost me. How is my code wrong?
          No Wildcard
          The Chunt of Chunts.

          Comment


            #6
            Originally posted by LondonManc View Post
            Have you tried using FREETEXT instead of CONTAINS?
            Thanks LM. I just tried that. Still nothing.

            Like 'attn%' does work
            Knock first as I might be balancing my chakras.

            Comment


              #7
              Originally posted by suityou01 View Post
              Thanks LM. I just tried that. Still nothing.

              Like 'attn%' does work
              OK and you explicitly specified WITH STOPLIST = OFF in your code?

              What version of SQL Server btw?
              The greatest trick the devil ever pulled was convincing the world that he didn't exist

              Comment


                #8
                Originally posted by MrMarkyMark View Post
                No Wildcard
                You don't always need a wild card. I understand this would force a full table scan, which kind of negates the effect of going to all the trouble of creating a full text index. Contains should match on the string wherever your search string occurs.
                Knock first as I might be balancing my chakras.

                Comment


                  #9
                  Originally posted by LondonManc View Post
                  OK and you explicitly specified WITH STOPLIST = OFF in your code?
                  I did do the following

                  Code:
                  ALTER FULLTEXT INDEX ON MyFullTextTable SET STOPLIST = OFF
                  Edit : 2012
                  Knock first as I might be balancing my chakras.

                  Comment


                    #10
                    Originally posted by suityou01 View Post
                    Thanks LM. I just tried that. Still nothing.
                    Like 'attn%' does work
                    If my column contains 'Attrn'
                    Why would it???

                    % just looks for Unknowns at the end of your string?

                    The "r" isn't at the end..
                    The Chunt of Chunts.

                    Comment

                    Working...
                    X