Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6639473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:33:29+00:00 2026-05-25T23:33:29+00:00

I have create this little sample Table Person. The Id is a primary key

  • 0

I have create this little sample Table Person.

enter image description here

The Id is a primary key and is identity = True

Now when I try to create a FullText Catalog, I’m unable to search for the Id.

enter image description here

If I follow this wizard, I’ll end up with a Catalog, where its only possible to search for a persons name. I would really like to know, how I can make it possible to do a fulltext search for both the Id and Name.

edit

enter image description here

SELECT *
FROM [TestDB].[dbo].[Person]
WHERE FREETEXT (*, 'anders' );

SELECT *
FROM [TestDB].[dbo].[Person]
WHERE FREETEXT (*, '1' );

I would like them to return the same result, the first returns id = 1 name = Anders, while the second query don’t return anything.

edit 2

Looks like the problem is in using int, but is it not possible to trick FullText to support it?

edit 3

Created a view where I convert the int to a nvarchar. CONVERT(nvarchar(50), Id) AS PersonId this did make it possible for me to select that column, when creating the Full Text Catalog, but It still won’t let me find it searching for the Id.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:33:29+00:00Added an answer on May 25, 2026 at 11:33 pm

    From reading your question, I am not sure that you understand the purpose of a full-text index. A full-text index is intended to search TEXT (one or more columns) on a table. And not just as a replacement for:

    SELECT *
    FROM table
    WHERE col1 LIKE 'Bob''s Pizzaria%'
    OR col2 LIKE 'Bob''s Pizzaria%'
    OR col3 LIKE 'Bob''s Pizzaria%'
    

    It also allows you to search for variations of “Bob’s Pizzaria” like “Bobs Pizzeria” (in case someone misspells Pizzeria or forgot to put in the ‘ or over-zealous anti-SQL-injection code stripped the ‘) or “Robert’s Pizza” or “Bob’s Pizzeria” or “Bob’s Pizza”, etc. It also allows you to search “in the middle” of a text column (char, varchar, nchar, nvarchar, etc.) without the dreaded “%Bob%Pizza%” that eliminates any chance of using a traditional index.

    Enough with the lecture, however. To answer your specific question, I would create a separate column (not a “computed column”) “IdText varchar(10)” and then an AFTER INSERT trigger something like this:

    UPDATE t
    SET IdText = CAST(Id AS varchar(10))
    FROM table AS t
    INNER JOIN inserted i ON i.Id = t.Id
    

    If you don’t know what “inserted” is, see this MSDN article or search Stack Overflow for “trigger inserted”. Then you can include the IdText column in your full-text index.

    Again, from your example I am not sure that a full-text index is what you should use here but then again your actual situation might be something different and you just created this example for the question. Also, full-text indexes are relatively “expensive” so make sure you do a cost-benefit analysis. Here is a Stack Overflow question about full-text index usage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have something like this: create table account ( id int identity(1,1) primary key,
I have this table CREATE TABLE [dbo].[friend_blocked_list]( [subdomain] [varchar](50) NOT NULL, [un] [nvarchar](50) NOT
I have this table CREATE TABLE `codes` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
I have this table: CREATE TABLE `test` ( `ID` int(11) NOT NULL auto_increment, `text`
I have this table: CREATE TABLE `point` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `siteid`
I have a table that looks something like this: CREATE TABLE student_results(id integer, name
I'm a little stumped on this one. Anyone have any ideas? I'll try to
I have this SQL Server 2008 UDT: CREATE TYPE [dbo].[IdentityType] AS TABLE( [Id] [int]
I have this: Create Proc CrearNuevoImagen @imagen image AS INSERT INTO Imagenes(imagen) VALUES( @imagen
I have create name range on sheet A so I need to use this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.