MySQL Questions and Answers – Using Full Text Searches

This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Using Full Text Searches”.

1. In which mode of search is the search string parsed into words and the search looks for rows?
a) Natural language
b) Boolean mode
c) Query expansion
d) Cross mode
View Answer

Answer: a
Explanation: In MySQL, a full text search capability is provided, which enables to look for words or phrases without using pattern-matching operations. There are three kinds of full text searches.

2. The indicator of presence or absence of a word in search is used in which mode?
a) Natural language
b) Boolean mode
c) Query expansion
d) Cross mode
View Answer

Answer: b
Explanation: A full text search capability is provided in MySQL. It facilitates to look for words or phrases without using pattern-matching operations. Boolean search is one of the three modes.

3. Which search mode uses natural language search as a subroutine?
a) Natural language
b) Boolean mode
c) Query expansion
d) Cross mode
View Answer

Answer: c
Explanation: The query expansion search occurs in two phases. The natural language search is applied in the first phase. Query expansion search is one of the three modes of fulltext searching.
advertisement
advertisement

4. FULLTEXT indexes can be created only for ____________
a) MyISAM
b) InnoDB
c) MEMORY
d) TRANSITION
View Answer

Answer: a
Explanation: Full-text searches are based on the FULLTEXT indexes. They can be created for MyISAM tables only. In MySQL, a full text search enables to look for words or phrases without using pattern-matching operations.

5. A FULLTEXT index cannot be created for multiple columns.
a) True
b) False
View Answer

Answer: b
Explanation: In MySQL, a full-text search is based on the FULLTEXT indexes. A FULLTEXT index can be created both for a single column and for multiple columns. Searching is possible across columns.

6. Which keyword is used to search through natural language fulltext?
a) MATCH
b) AGAINST
c) SEARCH
d) FIND
View Answer

Answer: a
Explanation: In MySQL, fulltext searches are carried in three modes. Natural language fulltext search is carried out using the MATCH and AGAINST clause. MATCH keyword specifies the column to be searched.

7. What is xyz in the following MySQL statement?

advertisement
	SELECT * FROM my_table WHERE MATCH(abc) AGAINST('xyz');

a) column name
b) table name
c) search string
d) database name
View Answer

Answer: c
Explanation: The natural language fulltext search in MySQL tables is carried out using the MATCH and AGAINST clause. The MATCH clause is used to specify the column and AGAINST specifies the search string.
advertisement

8. What is abc in the following MySQL statement?

	SELECT * FROM my_table WHERE MATCH(abc) AGAINST('xyz');

a) column name
b) table name
c) search string
d) database name
View Answer

Answer: a
Explanation: The MATCH clause is used to specify the column and AGAINST specifies the search string in the natural language full text search syntax. It is one of the three modes of full-text search.

9. In Boolean search, results are sorted by relevance.
a) True
b) False
View Answer

Answer: b
Explanation: Boolean mode FULLTEXT search is one of the three modes of FULLTEXT searches in MySQL. Boolean searches deal with the presence or absence of a word in a particular row to carry out the searches.

10. Which parameter determines the shortest words to index in FULLTEXT indexes?
a) ft_min_word_len
b) ft_min_len_word
c) ft_word_min_len
d) ft_word_len_word
View Answer

Answer: a
Explanation: There are many full-text parameters that are configurable. They can be modified by setting the system variables accordingly. The ‘ft_min_word_len’ parameter determines the shortest words to index in FULLTEXT indexes.

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.