I have a database filled with information about a bunch of different articles. I'm trying to add a search mechanisim to the site where you would type in what you are looking for, and it would search through the articles finding the most appropriate article. In my database I have a bunch of different fields that will help find the best article. For example, for each article, there is a title, description, category, a bunch of tags, Number of page views, number of votes, and the sum of all the vote scores. All this informaiton i believe can be used to gather the most relevent article based on the persons search terms. The problem is I don't know what to do with this information. What I would like to do is have a scoring system where the highest score is the first result and the lowest score is the last result. Where the first result is the most relevent.
So for example: The user types in "Korean War" it looks through all the articles, and gives all the articles with "Korean War" in the title + 1, all the tags with "Korean" or "War" + .1, then adds the number of views/1000, and then adds the average vote/4. (I just made that scoring system up on the spot, I would need to do some testing of course). Then it would sort the articles based upon the score it recieved. Is there anyway to do this with a select statement where I can run all of the calculations and then sort them with an "ORDER BY" command? Or would i have to have the server side code do the calculations store them in an array, and then sort them in the array? Or is there a better way of doing this that I might not know of (which is certainly possible).
i have a sql server database which has a table name tourheader.in this there are some fields named as follows--Id, name, city, description, tourcode. on the page i have two text box destination and keyword. I want to search the database according to the destination and keyword. in the tourheader the fields contain description and keyword are name and city.
i have make aquery---- string queryString = "SELECT Id , name " + "FROM TourHeader WHERE name like'%" + key + "%'AND city like'%" + key + "%' AND city like'%" + destin + "%'AND name like'%" + destin + "%'";
So, one of my end-users would like the option to search for a keyword and have all of the records that contain that keyword show up in a gridview. Is this possible? How would I do this? Are there tutorials somewhere?
I had gone thru many discussions re: search engine & didn't get the answer to what i intend to design. I intend to put the search textbox & button to the masterpage so that whatever page the user is within the website, he/she can do the search.
I've been following the example (SearchDotNet) in the developerfusion but I just can't figure how I'll make it to redirect to the searchsite from the page the user triggers the search. Do I put the codes in the masterpage?
I would love to create a search field on my master page that returns a page full of results.
It seems simple to me. I need it to search each of my tabels. aka(Customers, Loan Information, Real Estate, Vehicles) I want a repeater or datalist of sometype that hyperlinks to a details view page for each of the tables(easy to do).
I don't know the best way to tackle this. It is a local intranet application so I was thinking about possibly just passing the words or numbers in the textbox to a query string then running a sql command for each of the tables and returning data in a datalist for each table?
Would that work or is there a simple way to do this? It would be nice for it to highlight the match? What should my sql commands look like?
I would like to set up a keyword search with and/or wildcards which searches across a rather large tables with around 10,000 rows and growing.What would be the best to set this up ? I heard a lot about indexing etc, im using a SQL2005 DB.And I do not wish to purchase 3rd party software.
My site (ASP.NET + C#) has FAQ data pull from another site's web service in XML format. The data size is pretty small (just about 50 faqs). I want to implement a keyword search for the FAQ and highlight the search keyword. What could be a fast and easy approach to do this?
My first thought is just using a C# string search or any XML search method. I know this is not scalable. But consider the FAQ is little, it may not need to index the FAQ. I could be wrong.
i have a page with some simple search engine, this is how it looks,here is a TextBox with a Button and a Gridview with a SqlDatasource Control the Sql Code of the SqlDatasource Control is like this.
Well the sql is not the actual sql code but thats technically how it looks like. What i hope to make is when the user types a string in the Textbox, the user can Comma sepate the information so that the search engine will try to look for each information at the same time.
In one of my column have a comma separated list of keywords.I have to build a query that will return the matching rows whenever user enters the keyword.for ex.if my keywords are java,.net,sql,php,ajax then on search of java OR java,sql OR php,java should return the above row.
I am searching for products out of my database: AND (CONTAINS(P.name, @contains_key) OR CONTAINS(P.description, @contains_key) OR P.sku like '%' + @Keywords + '%')
As you can see I'm using the CONTAINS statement and searching against the name and description fields.I would like to give the results a weight (or score) based on how often the word shows up and in what field.Example:if the word shows up in the name field -- give it 2 points every time the words appears.if the word shows up in the description field -- give it 1 point every appearance.Then ORDER the query based on the Score. And, perhaps add a where clause that the Score > 1 or some value.I realize, I will probably have to re-write my query and this "point" system may not be possible, but I know there is a way to weight results, but can't find any help online. I would also assume, this would be done in temp tables and select statements and directly in the where clause.
in my project i would like to save pdf files in database, how to save pdf files in database ? along with that i would like to create create a search page to search for pdf files with PDF file names , how to accoplish these things
i am developing a web site in Asp.Net using Visual Studio 2008.i want to know that how can i search a keyword that will be entered by the user, i want the key word should be searched in complete database(all the tables)using a single query.I am using sql database. how can the keyword be searched using like parameter...
I have a search screen where there are total 15 search fileds...one among them is amount range (money datatype)...using Between keyword i am trying to filter the search results...problem is it is taking more time to fetch the records...if i comment only money range in where condition and all other remain same..then it is returning in 2 seconds for 25 records...otherwise it is taking around 31 seconds to return 25 records..