we want to make a NATURAL LANGUAGE search in database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpgurullc
    New Member
    • Aug 2009
    • 3

    we want to make a NATURAL LANGUAGE search in database

    hi,

    I have an issue that suppose

    there are two tables say A and B where

    A table have two column id and title
    B Table have two column say e_id and metatag

    so now we want to get all the data from A whose title contain a word say 'paris hilton' or metatag have 'paris hilton' need all those event.

    so to resolve this i have written the query

    Code:
    select a.title,b.metatags
    from A a INNER JOIN B b on b.e_id=a.id 
    where match(a.title) against ('paris hilton' IN NATURAL LANGUAGE MODE) or match(b.metatag) against ('paris hilton' IN NATURAL LANGUAGE MODE);
    it scan whole table so need an optemise way

    Where all the used colomun are FULLTEXT
    Last edited by Atli; Mar 23 '10, 08:13 PM. Reason: Added [code] tags.
Working...