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 3721092
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:26:17+00:00 2026-05-19T05:26:17+00:00

I am new to SQL Server Full Text Searching, and am trying to figure

  • 0

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 when used with multiple words. I want an AND so that the search results contain all of the words, so because of this I am choosing to use CONTAINS.

I am trying to do something like the query below, which uses FORMSOF with the proximity keyword NEAR for multiple words. Note that this is not valid syntax and returns an error:

select top 5 *
from content
WHERE CONTAINS((Title,Subtitle,Body), 'FORMSOF(INFLECTIONAL, model NEAR airplane)')

However, the query below works, but I don’t know if it gives the intended results. Is there a difference between “AND” and “NEAR” with SQL Full Text Search?

select top 5 *
from content
WHERE CONTAINS((Title,Subtitle,Body), 'FORMSOF(INFLECTIONAL, model) AND FORMSOF(INFLECTIONAL, airplane)')

I guess what I am asking is, is there a way to use CONTAINS, FORMSOF, and NEAR with multiple search words? Or should I just use the second query above that uses “AND”?

  • 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-19T05:26:19+00:00Added an answer on May 19, 2026 at 5:26 am

    From the docs:

    <proximity_term> ::= 
         { <simple_term> | <prefix_term> } 
         { { NEAR | ~ }
         { <simple_term> | <prefix_term> } 
         } [ ...n ] 
    

    This means you can use NEAR predicate for (possible prefixed) words, phrases and their combinations.

    Since your search terms are inflected using quite simple rules, you can just use prefixes:

    SELECT  *
    FROM    content
    WHERE   CONTAINS((Title,Subtitle,Body), 'model* NEAR airplane*')
    

    or use AND and do fine filtering on the client side

    SELECT  *
    FROM    ft
    WHERE   CONTAINS((Title,Subtitle,Body), 'FORMSOF(INFLECTIONAL, "model") AND FORMSOF(INFLECTIONAL, "airplane")')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a knowledge base project using SQL Server 2008 Full Text Search
I'm new to SQL Server Reporting Services, and was wondering the best way to
I want to use the Full Text Search feature of Microsoft SQL Server. If
I am new to SQL Server 2008 Full Text index function. I am learning
I am currently using SQL Server Management Studio (Ver 9.00.3042.00) and click the New
I'm using Microsoft SQL Server 2005, and am relatively new to SQL in general.
I'm loading a SQL Server 2000 database into my new SQL Server 2005 instance
I am new to SQL Server, and I have been tasked with setting permissions
Change Data Capture is a new feature in SQL Server 2008. From MSDN: Change
When I try to install a new instance of SQL Server 2008 Express on

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.