Full-stack dev quiz question #12

Full-stack dev quiz question #12

quizThe main role in the twelfth question of the quiz for a full-stack developer is played by Full-Text Search in SQL Server.

 

 

 

Consider the following short text:

Full-Text Search is an engine for search in texts. It uses linguistic knowledge to improve search results. It is much more powerful then LIKE operator in WHERE clause as it is more flexible. Full-Text Search knows how to split text to words and how words inflecting works. All this and more is used to provide better answers for queries.

It is inserted into a table article to a field content. Which Full-Text Search query executed against SQL Server 2016 should return a row with this text? Choose all correct answers:

  1. select *
    from articles
    where freetext(content, 'knowledgeable');
  2. select *
    from articles
    where freetext(content, 'knowledge to improve results');
  3. select *
    from articles
    where contains(content, '"knowledge to improve results"');
  4. select *
    from articles
    where contains(content, 'knowledge AND NOT improve');
  5. select *
    from articles
    where contains(content, 'near(knowledge, powerful, 2)');

 

For the answer scroll down

.

.

.

 

 

 

 

 

 

 

 

 

 

 

.

.

.

The correct answers are a, b. For more information about it, see Full-Text Search - practical introduction.