Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Possible Duplicate:
Calculate MATCH() AGAINST() scores from UNIFIED QUERY not FOR EACH TABLE

I want to have a FULLTEXT INDEX on data name in the base SELECT that selects data from another SELECT which unions several tables.

SELECT `data` FROM SELECT (
  SELECT `name` as `data` FROM `names`
  UNION SELECT `title` as `data` FROM `titles`
) as `search`

I want data to have a FULLTEXT INDEX

share|improve this question

marked as duplicate by ypercube, Mark Storey-Smith, jcolebrand Dec 19 '12 at 15:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Why not define an index on the relevant columns of the base tables? –  dezso Dec 17 '12 at 11:23
    
name and title are fulltext indexes –  dachints Dec 17 '12 at 11:53
    
Those are table columns and not indexes, but never mind, I think I got it: there are fulltext indexes defined on name and title. Then what is the question? –  dezso Dec 17 '12 at 11:55
    
Okay, columns name and title are indexed as FULLTEXT. I want data to have a FULLTEXT index as well. But there won't be such column as data in phpmyadmin to make it FULLTEXT in traditional way. Question is HOW TO MAKE data indexed as FULLTEXT –  dachints Dec 17 '12 at 11:59
1  
You can't do that, unless you create a table with the unioned data. But having indexes on both tables, why would you need that? –  dezso Dec 17 '12 at 12:03

1 Answer 1

What is your requirement? we cannot index "data" as it is not a column in table, It can defined with multiple columns within one table .

Few things to be considered while using Fulltext. Its only supported for MyISAM engine, You can also set few variables "ft_min_word_len" and "ft_max_word_len" to search, Some stopwords are ignored we can set change values at "ft_stopword_file", and Its not case sensitive search.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.