Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Full Text Search string

Posted on 2016-10-29
5
Medium Priority
?
81 Views
Last Modified: 2016-11-15
Hi experts,
Below is the string sample which will be passed from UI
"Hello world" Test daterange:10012016-10312016 description:unique

This is what we are expecting as a search in SQL Server full text.
contains(*,'"Hello world"')
contains(*,'test')
contains(description,'unique')
date_of_record between '10012016' and '10312016'

Anything within double quotes is a phrase and description is a name of column in database table.

Any similiar solution or an idea would be very helpful.

Working with charindex, patindex etc..but running out of time, Help very much appreciated.

Thanks,
Ravi
0
Comment
Question by:raviprakash10
  • 3
5 Comments
 
LVL 35

Expert Comment

by:Pawan Kumar
ID: 41865181
Can you post your current query ? Also are you sure that you want to implement Full text search?

If yes,

Steps are-
1. Create a full-text catalog, if reqd.
2. Create the full-text index.
3. Modify the list of noise words, if reqd.
4. Modify the thesaurus for the language being used, if reqd.

Below is the really good blog url you can follow-

http://www.sql-server-performance.com/2010/full-text-search-2008/

Hope it helps!!
0
 

Author Comment

by:raviprakash10
ID: 41865184
Hi Pawan,

Thanks for your response.

IS there any concern with Full-Text Search?Appreciate you opinoin, before we move further along with this option. Are there any better options?

Here is the scenario.
Basically there is a table which gets inserted once every month around half a million records, and has around 50 columns. No inserts or deletes or updates until next month , where it gets truncated. We plan to create full text index on this and use the seacrh as described above.Does this solution fit the need?

Have no queries yet. Just finding best solution either with csutom .NET assembly with Regex /Regular expression or T-sql .

Any help is very much appreciated.
Thanks,Ravi
0
 
LVL 35

Accepted Solution

by:
Pawan Kumar earned 2000 total points
ID: 41865197
Also can you provide me the T-SQL you are using currently.

I think yes you can try FTS.

Steps are-
1. Create a full-text catalog, if reqd.
2. Create the full-text index.
3. Modify the list of noise words, if reqd.
4. Modify the thesaurus for the language being used, if reqd.

Below is the really good blog url you can follow-

http://www.sql-server-performance.com/2010/full-text-search-2008/
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 41866841
Ravi, you can and should use Full-Text search feature to perform queries on text fields (BLOB).
Just don't forget that this feature also requires maintenance because it also suffers from fragmentation. For that schedule regularly an ALTER FULLTEXT CATALOG REORGANIZE and ALTER FULLTEXT CATALOG commands.
0
 
LVL 35

Expert Comment

by:Pawan Kumar
ID: 41871713
@Author - Any luck with this?
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question