I am working on a project with SQL Server 2008 where I believe that full-text search is the best way. I read on it as much as I could, and I understand that he wanted to configure it for one table. However, I'm not quite sure how to configure it using my script - imagine the following table structure:
Book
- Id - Title - Description
Bookauthor
- BookId - AuthorId
Author
- Id - Name
As you can see, the database contains a table with books, and in each book there is not one, one or many authors. Each author can also be part of not one, one or many books, i.e. The Book and Author tables are many-to-many tables processed by the BookAuthor binding BookAuthor .
What I want to do at this point is a search tool to find matching books based on the search string that the user provides. Therefore, if the user enters Brown , I would like to find all books that contain the word Brown in one of the following columns:
Book.Title Book.Description Author.Name
In essence, I need a resulting set of books, including a book called Brown Bear and books written by Dan Brown . If there are any suggestions on how I should do this, I would really appreciate your input!
(as a side note, as soon as I work with this filtering, the query result should also be sortable and accessible for the page, processed via @SortOrder , @PageIndex and @PageSize in the stored procedure - but I think this may be a separate issue later! )
source share