Questions tagged [containstable]

A T-SQL operator for performing a full-text search.

It performs a SQL Server full-text search on full-text indexed columns containing character-based data types.

More information here.

67 questions
3
votes
1 answer

Full text search syntax error

I created a full text search with a catalog and index and the contains query works fine when I run a query with one word like below. SELECT Name FROM dbo.Gifts WHERE CONTAINS(Name, 'gift') it returns 'test gift' I have only one row in the table and…
chuckd
  • 13,460
  • 29
  • 152
  • 331
3
votes
2 answers

Search for ampersand (&) when using containstable in MS SQL Server

I'm using a stored procedure on a autocomplete dropdownlist to retreive a list of clients. Some of the clients have an '&' (ampersand) sign in the name e.g. 'H&M', 'Marks & Spencers' and users would like to search on the '&' sign. When i directly…
K-M
  • 660
  • 3
  • 13
  • 27
3
votes
1 answer

CONTAINSTABLE does not work on single character

I am doing search using containstable() on a table but it is not working if I enter only single character in search string. Below is the query I am using. DECLARE @FreeTextSearch VARCHAR(500)='a' SELECT tblProjectIDs.[KEY] FROM…
Microsoft Developer
  • 5,229
  • 22
  • 93
  • 142
3
votes
1 answer

Can I use a variable when using ISABOUT?

I'm trying to use a stored procedure to create a table that ranks posts by taking a topic name and using keywords and weights associated with that topic name to determine how they should be ranked. I've been trying to use CONTAINSTABLE and ISABOUT,…
kelsothenerd
  • 89
  • 1
  • 2
  • 6
3
votes
1 answer

Near matches not found in CONTAINSTABLE

I am using SQL Server 2008 DDL CREATE TABLE [dbo].[t]( [words] [varchar](1000) NULL, [id] [int] IDENTITY(1,1) NOT NULL ) ON [PRIMARY] DML insert into t(words)values('this is my laptop') insert into t(words)values('this does not contains…
2
votes
1 answer

SQL Server full text search issue

I have a problem with full-text search results, I need to find rows that contain " spray " in name column and not contains " men " in description column. select top 10 ftt.RANK, ID, name, description from mod_product_all_fields INNER JOIN…
2
votes
0 answers

Full text search - containstable - rank 0

Using SQL Server 2016. I have a table in a database that contains products that I search through "keywords" with Full Text Search. Our client has asked that we remove the single character "n" from the stop list to allow for searching on terms like…
Matthew Baker
  • 2,637
  • 4
  • 24
  • 49
2
votes
1 answer

How can CONTAINSTABLE ranked results be improved for "5mil" search?

A search of product dimensions using CONTAINSTABLE using the weighted-term of... ISABOUT("5mil" weight(1.0)) ...produces ranked results in which products with "1.5mil" are ranked ahead of those with " 5mil". Is there a way to get " 5mil" matches…
JohnH
  • 1,920
  • 4
  • 25
  • 32
2
votes
2 answers

Is it possible to use ContainsTable to get results for more than one column?

Consider the following table: People FirstName nvarchar(50) LastName nvarchar(50) Let's assume for the moment that this table has a full-text index on it for both columns. Let's suppose that I wanted to find all of the people named "John Smith" in…
LockeCJ
  • 558
  • 1
  • 4
  • 21
2
votes
3 answers

AND statement for multiple columns in fulltext index

I have a fulltext indexed table and try to query for results matching multiple words. E.g. I have a address table with the indexed columns address_text, zip_code and city. | ROW | address_text | zip_code | city | | 1 | Bourbon street |…
Haze
  • 116
  • 7
2
votes
1 answer

SQL ContainsTable returns low Rank for exact match

For a product named "Red bike with upgraded racing frame", a containstable search returns the following: containstable(tbl, col, '"red bike"') Rank: 100 containstable(tbl, col, '"red bike with upgraded racing frame"') Rank: 255 My questions…
StronglyTyped
  • 2,134
  • 5
  • 28
  • 48
2
votes
2 answers

CONTAINSTABLE performance with "1-1" searches

I am using a query with the containstable function, with a string search like this: "1-1" or similar (like "1 1" or "a a") The issue is that the query takes way too long and doesnt bring many results. Instead the same query, but with other search…
2
votes
0 answers

How to weight in full-text search

I want to search on a phrase, for example "search preference". I want to return the phrase itself as most heavily weighted. Next I would want to return "search" and/or "preference". And, in lowest ranking, I would want "searching" or "searches" or…
NetWriter
  • 55
  • 5
1
vote
1 answer

Auto resizing NSBox

I have NSBox with NSTableView siting inside it. I have disabled the scrolling in the table and trying to auto resize the NSBox to mach the number of entries in NSTableView but don't know how to...any help?
David
  • 11
  • 1
1
vote
1 answer

SQL Server Full-Text Search returns unexpected result

I have a couple of million records in a Microsoft SQL Server database table. The search with [Column] LIKE '%test%' is way too slow. Therefore, I use a full text search. My query looks as follows after a lot of tries with CONTAINS and…