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 900 bytes limitation

Full-text search 900 bytes limitation

Scheduled Pinned Locked Moved Database
helpdatabasesql-serversysadminalgorithms
5 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.
  • M Offline
    M Offline
    Meysam Mahfouzi
    wrote on last edited by
    #1

    As I've understood, it's not possible to have full-text search indexing on columns larger than 900 bytes. I know I can overcome this problem by adding large columns as non-key included columns to non-clustered indexes. But still I'm not able to use the powerful search capabilities of full-text search. I can only use queries like "select c from t where c like '%find%'". That's, I can not easily look for combination of words. Is there any known solution for searching large fields that can not be easily indexed in SQL Server? As an example, how has it been implemented to search multiple words in codeproject forums? Is it something simple like this?

    SELECT * FROM Messages WHERE Title LIKE '%word1%' OR Title LIKE '%word2%'

    Thanks in advance for any help.

    W 1 Reply Last reply
    0
    • M Meysam Mahfouzi

      As I've understood, it's not possible to have full-text search indexing on columns larger than 900 bytes. I know I can overcome this problem by adding large columns as non-key included columns to non-clustered indexes. But still I'm not able to use the powerful search capabilities of full-text search. I can only use queries like "select c from t where c like '%find%'". That's, I can not easily look for combination of words. Is there any known solution for searching large fields that can not be easily indexed in SQL Server? As an example, how has it been implemented to search multiple words in codeproject forums? Is it something simple like this?

      SELECT * FROM Messages WHERE Title LIKE '%word1%' OR Title LIKE '%word2%'

      Thanks in advance for any help.

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      Full-text index doesn't have a limit of 900 bytes on indexed columns. The limit is only for key index. So if you have a good primary key, you should not have any problems using full-text indexes.

      The need to optimize rises from a bad design

      M 1 Reply Last reply
      0
      • W Wendelius

        Full-text index doesn't have a limit of 900 bytes on indexed columns. The limit is only for key index. So if you have a good primary key, you should not have any problems using full-text indexes.

        The need to optimize rises from a bad design

        M Offline
        M Offline
        Meysam Mahfouzi
        wrote on last edited by
        #3

        What do you mean by key index Mika? Primary clustered index? Should I necessarily add a column as a non-key included column to a non-clustered index if I want to have full-text search on it? Thanks

        W 1 Reply Last reply
        0
        • M Meysam Mahfouzi

          What do you mean by key index Mika? Primary clustered index? Should I necessarily add a column as a non-key included column to a non-clustered index if I want to have full-text search on it? Thanks

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          Not necessarily clustered index, but primary key or unique key of the table. See KEY INDEX argument in CREATE FULLTEXT INDEX (Transact-SQL)[^]

          The need to optimize rises from a bad design

          M 1 Reply Last reply
          0
          • W Wendelius

            Not necessarily clustered index, but primary key or unique key of the table. See KEY INDEX argument in CREATE FULLTEXT INDEX (Transact-SQL)[^]

            The need to optimize rises from a bad design

            M Offline
            M Offline
            Meysam Mahfouzi
            wrote on last edited by
            #5

            Thank you. So there should be no problem. I don't know why somebody told me it's not possible to use it on fields larger than 900 bytes! Maybe I misunderstood the point.

            _

            modified on Sunday, October 5, 2008 4:47 PM

            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