SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fulltext Query not returning all results

    I am running the following query in my app and only 1 result is returned.

    Code MySQL:
    SELECT part,f2,f3,f4,f5,f7, MATCH(part,f2,f3,f4,f5,f7) 
    AGAINST (''nas3'' IN BOOLEAN MODE) AS relevance 
    FROM quotedb 
    WHERE MATCH(part) AGAINST (''nas3'' IN BOOLEAN MODE)
     ORDER BY relevance DESC

    However when i use the same search term using a like and 'ends with query', I get almost 10,000 results as expected as expected.
    Code MySQL:
    SELECT *
    FROM `quotedb`
    WHERE part LIKE 'nas3%'

    My question is, how do I make the first query return all of the results containing 'nas3'?

  2. #2
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Strangely, when i change to search term to nas35 in the above fulltext query, i get MORE results than if I didn't include the last digit.

    I would imagine this would be more restrictive search. What gives?


    Code MySQL:
    SELECT part,f2,f3,f4,f5,f7
    , MATCH(part,f2,f3,f4,f5,f7) 
    AGAINST ('nas355' IN BOOLEAN MODE) AS relevance 
    FROM quotedb 
    WHERE MATCH(part) 
    AGAINST ('nas355' IN BOOLEAN MODE) 
    ORDER BY relevance DESC


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •