Showing posts with label explorer. Show all posts
Showing posts with label explorer. Show all posts

Sunday, February 26, 2012

Full-Text Setup and Search

Hi,

I have a database developed using SQL Server Management Studio Express with Full-Text searching. I can go into the Object Explorer and right click on my database and choose Properties, select File and the 'Use-full-ext indexing' is checked.

I'm not sure how I create an index for a table, can someone help? I want to create an index for table 'tblLogNotes' and have the following columns:

note_id = (PK, int, not null)
note = (varchar(3000), not null)
log_id = (FK, int, not null)
operatorid = (int, not null)
note_created = (datetime, not null)

I know I did something but not sure what I did, but on one of my tables, when I right click on table and choose 'log_note', I can see that Full-text Specification = yes, (is full-text indexed = yes), full-text type column = <none> and language = English (United States).

Table 'tblLog' has the following columns:
log_id - (PK, int - not null)
log_note (varchar(3000), not null)
tag_number(varchar(50), not null)

However, when I try the following query, I get nothing:

SELECT *
FROM tblLog
WHERE CONTAINS(Log_note, '"pump*"')

I've also tried: 'pump'

What am I doing wrong?

Thanks,

Hi Ed,

You need to create a Full Text Catalog and a Full Text Index before you can query against them. See...

CREATE FULLTEXT CATALOG

CREATE FULLTEXT INDEX

and

The Full Text Overview topic in Books Online.

SSMSE does not enable the Full Text commands for technical reasons, but you can use the Template Explorer to get the basic SQL statements and then just fill in the blanks for your database.

Mike

Friday, February 24, 2012

FullText Search SQLserver2005 using VS2005 Server Explorer

Hello,

I am using SQLServer Express and Visual Studio 2005 to create the website. I would like to implement FullText search, but have never done it before. I have looked at the msdn documentation on FullText search in SQLServer 2005 herehttp://msdn2.microsoft.com/en-us/library/ms142519.aspx.

I cannot seem to figure out how to use a FT search using Visual Studio. Can someone please help me configure my database and then explain how I can run queries based on user input to return data?

Hi KJAK,

KJAK:

I am using SQLServer Express and Visual Studio 2005 to create the website.

In the SQL Express Edition, you have to do some more work the in the other SQL editions.

KJAK:

I cannot seem to figure out how to use a FT search using Visual Studio.

Use the Sql Server Management Studio Express. Open the Template Explorer, select the Full-text folder and select theCreate Full-text Index template. Fill in the needed information and run it. Then select theCreate Full-text Catalog template and do the same.

BTW. Sql-BOL is your friendSmile

|||

What I have now figured out is that I will not be able to implement FULL-TEXT search on this particular site. I am using a shared hosting provider and they do not provide me access via the Sql Server Management Studio Express because they do not permit remote connections. I have some documentation that may help me get around this issue to configure the database, but since the database is provided by the host, it may not work.

I have marked your reply as answered as a way to thank you for your help and will keep this post in mind when I am working with dedicated server websites.

Thanks for your reply!
KJAK

|||

KJAK:

I have some documentation that may help me get around this issue to configure the database, but since the database is provided by the host, it may not work.

Is your DataBase transmitted to the ISP sql server, or its a dynamically attached DataBase in your App_Data folder?

In the second case, AFAIK Full-text search wount works, because you need access to the Fulltext-Catalog directory to populate your index.

|||

The database is located on the hosts network. They provide a client that I connect to in which I can define tables, stored procedures, schema's, et cetera. It does not provide me access to the catalogs and is limited in what I can do all together. I have not yet spoken to the host to see if they can explain how to do it or whether I can do it or not.

|||

KJAK:

It does not provide me access to the catalogs and is limited in what I can do all together.

You may change to a ISP they will give you a dedicated SQL server. Or live with this restrictionsSmile