Full Text Search with multiple keyword or Text Phrase

  • Hi All,

    Recently, we had a requirement to implement keyword based search & user can enter only one "word" means one keyword. So, I used LIKE 'keyword%. & It was working fine.

    But now user can enter a keyword or keywords or any text phrase. So, I decided to use Full Text Search & implemented FTS. But now there is an issue. Desired Results are not coming.

    I am not able to use CONTAINS because it is giving error due stopwords. So, I am using FREETEXT.

    I just consider a very simple common example.

    E.g:

    1. suppose user enter a Text "mobile" & this returns 1000 rows(this count is just an example. My query will return several thousands of rows).

    2. Now, If I change the text to "samsung mobile" then it should return those results which contain "samsung" and "mobile" both keywords.

    But FREETEXT returning all those rows which contains either "samsung" or "mobile" or both.

    3. Now, I again change search to "samsung mobile for sale in delhi". The result set should be narrow. But this is not happening. As you see, this search text contains stopwords, so I am not able to use "CONTAINS()", so I used FREETEXT().

    I have read several articles on FTS, but i didn't find the solution of this problem.

    Please provide me some guidance to sort this issue.

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply