Skip to main content
Inspiring
September 11, 2007
Question

Basic Website Search

  • September 11, 2007
  • 7 replies
  • 567 views
HI Folks,

I'm currently using a basic SQL search using the LIKE function. It works to some extent, but takes a long time to execute.

I was wondering if there is a more efficient way to search a Db. I'd like to include a % in the results page, showing the relevancy of the reults from the initial query.

Could verity be setup to search a Db?

Has anyone any ideas?

thankyou

    This topic has been closed for replies.

    7 replies

    December 6, 2007
    Qik response, replace all your OR operator with UNION;
    also, look into freeText search...
    September 12, 2007
    Have you tried double-quotes, as in "a level"?
    MattasticAuthor
    Inspiring
    September 12, 2007
    Bump
    MattasticAuthor
    Inspiring
    September 11, 2007
    One of the main problems I have is when I search for the text 'a level' it picks up all the courses containing the text 'level'
    MattasticAuthor
    Inspiring
    September 11, 2007
    Thanks for your replies, here is my query:

    Inspiring
    September 11, 2007
    I personally don't like verity. It's a pain in the a$$ to implement and maintain.

    There may be other reason why the search query takes too long. Are you using SQL Server? If so, use the SQL debugger to see how long the query call takes. MS SQL bebugger tool helps weed out poor SQL code or improper index keys, etc Check your indexes to see if their correct also. How many records do you have? Are you checking only on table or you joining other tables to get the result? Does it always run slow, or only during certain times (like peak site usage)? Post one of the SQL query so we can help debug further.
    Inspiring
    September 11, 2007
    "Could verity be setup to search a Db?
    >
    > Has anyone any ideas?"

    Yes, verity can be setup to search a DB, check the documentation and it
    explains how to do this. Whether this is the best solution is an open
    question.

    Some database management systems have text search functionality that is
    more powerful then basic LIKE matching. But this functionality is
    specific and different for each database product. I would also suggest
    checking your database documentation and|or dba for more options.