473,503 Members | 3,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Weighted Full Text Search Question

Ok, how to do this efficiently escapes me, so I'm going to ask and see
if anyone might have ideas.

My problem is really simple. I have a database filed with user
comments. It's basic fields are an id (primary key), a user id (of the
user who submitted the comment), and the comment itself.

I have a separate user database that contains an id, the user name,
and the user's trustworthiness.

Now I want to do a fulltext search of the comment database using its
comment field.

Here is where I'm having trouble: I want to give the comments
submitted by more trusted users a higher weight in the search so that
they are more likely to come out on top.

I've been reading and have yet to find a good way to do this. Any
ideas?

Help is much appreciated.
Jul 19 '05 #1
6 1802
Alkaline wrote:
Here is where I'm having trouble: I want to give the comments
submitted by more trusted users a higher weight in the search so that
they are more likely to come out on top.

I've been reading and have yet to find a good way to do this. Any
ideas?


Add field: trust_value to your table (either to comment or user table,
depending on what you want), and add "order by trust_value" to your query.
Jul 19 '05 #2
Alkaline wrote:
Here is where I'm having trouble: I want to give the comments
submitted by more trusted users a higher weight in the search so that
they are more likely to come out on top.

I've been reading and have yet to find a good way to do this. Any
ideas?


Add field: trust_value to your table (either to comment or user table,
depending on what you want), and add "order by trust_value" to your query.
Jul 19 '05 #3
Alkaline wrote:
Here is where I'm having trouble: I want to give the comments
submitted by more trusted users a higher weight in the search so that
they are more likely to come out on top.

I've been reading and have yet to find a good way to do this. Any
ideas?


Add field: trust_value to your table (either to comment or user table,
depending on what you want), and add "order by trust_value" to your query.
Jul 19 '05 #4
Aggro <sp**********@yahoo.com> wrote in message news:<Ed***********@read3.inet.fi>...
Alkaline wrote:
Here is where I'm having trouble: I want to give the comments
submitted by more trusted users a higher weight in the search so that
they are more likely to come out on top.

I've been reading and have yet to find a good way to do this. Any
ideas?


Add field: trust_value to your table (either to comment or user table,
depending on what you want), and add "order by trust_value" to your query.


But if I have a query like:

SELECT users.name,users.location,comments.comment FROM users JOIN
comments
ON (users.id = comments.userid) WHERE MATCH (comment) AGAINST
('sorta');

and then I add an "ORDER BY trust_value" thing to it, won't it first
order by relevancy and then within that order by trust?
Jul 19 '05 #5
Aggro <sp**********@yahoo.com> wrote in message news:<Ed***********@read3.inet.fi>...
Alkaline wrote:
Here is where I'm having trouble: I want to give the comments
submitted by more trusted users a higher weight in the search so that
they are more likely to come out on top.

I've been reading and have yet to find a good way to do this. Any
ideas?


Add field: trust_value to your table (either to comment or user table,
depending on what you want), and add "order by trust_value" to your query.


But if I have a query like:

SELECT users.name,users.location,comments.comment FROM users JOIN
comments
ON (users.id = comments.userid) WHERE MATCH (comment) AGAINST
('sorta');

and then I add an "ORDER BY trust_value" thing to it, won't it first
order by relevancy and then within that order by trust?
Jul 19 '05 #6
Aggro <sp**********@yahoo.com> wrote in message news:<Ed***********@read3.inet.fi>...
Alkaline wrote:
Here is where I'm having trouble: I want to give the comments
submitted by more trusted users a higher weight in the search so that
they are more likely to come out on top.

I've been reading and have yet to find a good way to do this. Any
ideas?


Add field: trust_value to your table (either to comment or user table,
depending on what you want), and add "order by trust_value" to your query.


But if I have a query like:

SELECT users.name,users.location,comments.comment FROM users JOIN
comments
ON (users.id = comments.userid) WHERE MATCH (comment) AGAINST
('sorta');

and then I add an "ORDER BY trust_value" thing to it, won't it first
order by relevancy and then within that order by trust?
Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6033
by: dave | last post by:
I am wondering if the following can be done. I want to setup a search page that utilizes full text searching in sql2000. I want the user to type in say "where is bill" and have the query search...
1
3458
by: Liu, Mingyi | last post by:
Sorry if this question has been asked before. I tried to search in postgres mailing lists at http://archives.postgresql.org/pgsql-general/ just now and it gave me error "An error occured! Can not...
8
1647
by: DQ dont quit | last post by:
I'm currently working on a ASP.Net / C# / SQL 2000 project that involves the entering of keywords, that a web user enters, and then searching MSWord documents for those words. This information...
1
5326
by: RAM | last post by:
Hello, I have installed SQL Server 2005 Express Edition Advanced Services and SQL Server 2005 Express Edition Toolkit SP1. I cannot use full-text search. When I called: exec sp_fulltext_service...
3
5291
by: Salad | last post by:
http://www.mathwords.com/w/weighted_average.htm At the above link gives an example of a weighted average. It uses the following example: Grades are often computed using a weighted average....
6
2467
by: alessandro.carrega | last post by:
In Igraph library (http://cneurocvs.rmki.kfki.hu/igraph/) there's a method to add a weighted edge?
0
1745
by: Skywick | last post by:
Hi I am trying to do a full text search with a column name for the search term. I can do this using LIKE with: SELECT tblContent.ID FROM tblContent INNER JOIN #keywords ON tblContent.words...
8
5084
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are...
65
5019
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but...
0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5559
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4991
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.