Friday, February 24, 2012

How to build search at website?

Hi! Maybe Iask simple question. But for me it's not so. The matter's I plan organizesearch at my website. It has catalog of firm's and good's in SQL Server. I planto build dictionary table with two fields' search_item and link. But problem isthat I should put all search variant's in field search_item(name of firm, nameof boss, name of good etc.) Maybe there's another concept to build search?Thank's for any answer.

Andrey.

You could take a look at FREETEXT in SQL Server. Also SQL 2005 has some % "closeness" matching (sorry I can't remember its name off the top of my head).|||

Thank you. It'suseful for me. But I'm interesting more in concepts how to build search in mycase.
Andrey.

|||

There is a recent post where someone is trying to do something kinda similiar, it's titled "No result from stored procedure". It's a stored procedure that basically allows that person to search almost any field in their row of things and get back what they want.

Unless you really want to build a search engine, where you put in a word, and it comes back with all kinds of stuff you really didn't want (Like most search engines). The above approach is better in many cases where you know what it is you want to search (Like title, author, price), rather than search everything for a specific word.

|||I would say it depends on how and what you're going to search. If you've got a limited number of fields then going along the lines you've suggested is probably going to be ok, although it can soon get messy when you consider OR or AND, sounds-like, wildcards etc. I know in the past I've used XML to form up the search condition. That way you can create a nice generic search engine, save you favourite searches, etc. In SQL you then process the SQL and support the different types of search logic.

No comments:

Post a Comment