SQL Full text search with foreign key columns

I have a table (table 1) with a couple of columns that I want to index on.
There is also an ArticleID (foreign key) column, with this id I want to use join to retrieve "articleTitle" from the articles table (table 2) and curse to search that column.

How do I create this type of index? Do I need to index both tables? and how should I write a select query for this?

+2


source to share


1 answer


You need to create a view and an index which

I spent a lot of time on this a while ago and submission was the only way I could do it.

I also put everything in 1 column. By this I mean that I have added all the text from each column to one column. For example, you have a simple table with ids, first, middle, family columns. In my opinion, I would compensate them for 1 column in my opinion. So for the line

ID: 1 - First name: Joe - Middle name: Bob - Last name: Joe



In the view, you will see one column with

1 Joe Bob Joe

This was because I found that some records would not be returned if they were not in ALL columns. Thus, by concentrating it to 1 column, this problem was eliminated.

0


source







All Articles