Questions tagged [formsof]

Part of Microsoft SQL Server syntax for performing full-text (linguistic) searching.

A part of Microsoft SQL Server Full-text search syntax, the FORMSOF term performs matches on inflectional and synonymous forms of the supplied word, such that a search for "RUN" could return matches for "RAN," "RUNNING," "JOG," "JOGGING," etc.

9 questions
7
votes
1 answer

SQL Server Full Text Search using CONTAINS, FORMSOF, NEAR for multiple search words

I am new to SQL Server Full Text Searching, and am trying to figure out the best way to search on multiple words using the inflectional engine so the search uses the various forms of all of the words. From what I read, FREETEXT uses an implicit OR…
n3wton23
  • 73
  • 1
  • 1
  • 4
7
votes
1 answer

SQL Server full-text search using thesaurus and prefix form together

Here is a sample table with full-text search on FTSdata field: CREATE TABLE dbo.tTest (Id INT, FTSdata VARCHAR(100)); INSERT INTO dbo.tTest (Id, FTSdata) VALUES (1, 'foo WordA'), (2, 'foo WordAaabbb'), (3, 'WordB bar'), (4, 'WordBbbaaa bar'); I…
GriGrim
  • 2,891
  • 1
  • 19
  • 33
4
votes
2 answers

SQL Server 2008 R2 Full Text Search with FORMSOF and Accent Insensitive

I'm using MS SQL Server 2008 R2 with Full Text Search for searching text data stored in different languages. I'm a bit confused about how CONTAINS predicate works with accents. When I use the following predicate CONTAINS([Text], @keywords ,…
3
votes
2 answers

Can FORMSOF be nested?

I'm trying to see if the Full-Text Search feature of SQL Server can be used in a certain way. My idea is to do something like: Take N keywords and search for all the forms of said keywords and its synonyms. What I came up with was something along…
Tejo
  • 1,268
  • 11
  • 18
1
vote
2 answers

Parameters in the FormsOf function and SQL injection

Is the following SQL susceptible to SQL injection via the @SearchWord parameter? I want to use parameters with the FormsOf function, but the only guide to doing so I've found is in this Stack Overflow question: How to pass parameter to FormsOf…
Andrew M
  • 9,149
  • 6
  • 44
  • 63
0
votes
0 answers

Full text seach in Doctrine using query builder with no result hits

Specs: Symfony v5.3.16 SQL Server 2017 Doctrine Bundle v2.4.4 Doctrine ORM v2.9.6 I've got a problem with full text search for SQL Server using Doctrine's query builder. I'm trying to use it with predicate 'FORMSOF' but as a result I get 0 hits…
0
votes
0 answers

when i write MS SQL full text search query for return all matches, then it give me not correct output

this is my query:- select * from dbo.zones where freetext(name, 'test'); select * from dbo.zones where contains(name, 'formsof(INFLECTIONAL, test)'); this give me result of- test, testing, tested Select * from dbo.zones where contains(name,…
0
votes
1 answer

Multiple quotation marks in a SQL Server stored procedure for use with FREETEXT/FORMSOF

I have been looking at this query snippet for awhile, thinking that I have the single quotes matched properly, but I keep getting blank result sets. Am I missing something here? I'm trying to find inflected versions of parametrized keyword…
Chocobo
  • 3
  • 1
-1
votes
1 answer

Problem with search query in my Sql Server stored proc

I have the following stored proc :- SELECT Id, Name FROM FooBars WHERE CONTAINS(Name, 'FORMSOF(Tesaurus, @query)') Works fine when there is one word i the query: eg. foo* But it fails when I want to have more than one word which i'm trying to look…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647