Find jobs | Company-wise jobs
Jobseekers | Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Interview Q&A Tutorials .NET Java Soft skills CV GD Work from home IT practice test MBA practice test FAQs in PDF Books Jobs FAQs
Interview questions                                 
MySQL interview
MySQL FAQs
Test your MySQL skills!
MySQL defined
MySQL SELECT Statement
MySQL sorting data
MySQL filtering
MySQL operator
MySQL searching
MySQL concatenating fields
MySQL text manipulation
MySQL date time manipulation
MySQL numeric manipulation
MySQL Group by
MySQL table
MySQL data type
MySQL sequences
MySQL indexes
MySQL subquery
MySQL joins
MySQL union
MySQL full text searching
MySQL insert statement
MySQL updating & deleting data
MySQL views
MySQL stored procedures
MySQL cursors
MySQL triggers
MySQL transactions
MySQL optimizing performance
MySQL security management
MySQL globalization & localization
MySQL database maintenance
  
PHP
Database concepts
Oracle
Sql server
Biztalk
Sharepoint
Notification services
Reporting services
Service-oriented architecture
Data warehousing
 

MySQL full text searching


MySQL - full text searching

<<Previous  Next>>

Explain how to use MySQL full text searching capabilities to perform data querying.
Explain the three types of full-text searches.
What are the Full-Text Restrictions?

MySQL full text searching - Dec 13, 2008 at 22:00 PM by Rajmeet Ghai

Explain how to use MySQL full text searching capabilities to perform data querying.

Full text searching is performed by operating on words and phrases based on rules of a particular language. A full text index on column that contains char, varchar and nvarchar data can be built. Full text indexes can also be built on columns containing formatted binary data. For full text index, the table must have a single, unique not null column

Explain the three types of full-text searches.

boolean search – Full text searches can be done in Boolean mode as well.

SELECT * FROM product WHERE MATCH (product_color)
AGAINST (‘+Blue –red’ IN BOOLEAN MODE);

Here, + means the word is required to be present while – indicates that the word requires to be absent. This means that + can be considered as AND while – can be considered as NOT in Boolean search. Boolean text search does not automatically sort rows in order of decreasing relevance.

Natural language- The Match() function by default performs a natural language search.

CREATE TABLE product (
Id INT(10),
Color VARCHAR(200),
Description TEXT,
FULLTEXT(color,Description)
);

To search for products with ALL colors and famous in their description
SELECT * from product
WHERE MATCH (color, description) AGAINST (‘famous’);

The search is performed in a case insensitive fashion.

query expansion- This type of expansion is generally used when the user wants to search for a short phrase. Blind query expansion is enabled by adding WITH QUERY EXPANSION phrase. It serahes twice where the search phrase for the second search is the original search phrase concatenated with the few most highly relevant documents from the first search. 

Example:

SELECT * FROM product WHERE MATCH (product_color, description) AGAINST (‘Blue’ WITH QUERY EXPANSION);

Here, we intend to find products with blue color.

What are the Full-Text Restrictions?

  • Full – Text searches are supported by MyISAM tables only.
  • FULL TEXT parser cannot work for languages like Chinese or Japanese where there is no word delimiter.
  • All columns in a FULLTEXT index must use the same character set.
  • The argument passed to AGAINST () must be a constant string.


<<Previous  Next>>

 
Want to be hunted by potential employers? Just submit your key skills!

Popular FAQs

.NET .Net Architecture ADO.NET Java Oracle C#.NET
VB.NET DOT.NET AJAX ASP.NET NET Framework OOPS in .NET
C++ Sql Server Data warehousing EJB MySQL Linux
PHP UML Networking Testing XML  
 
Copyright © 2008 - 2010 CareerRide.com. All rights reserved.