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. 6 1809
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.
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.
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.
Aggro <sp**********@y ahoo.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,user s.location,comm ents.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?
Aggro <sp**********@y ahoo.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,user s.location,comm ents.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?
Aggro <sp**********@y ahoo.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,user s.location,comm ents.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? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 across
multiple columns in multiple tables and return a single
list of results so that i can show unique records that
are returned.
The problem is that my data for 1 record is split across
multiple tables so that the search has to occur in each
|
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 connect to search daemon".
Anyway I installed tsearch2 and openFTS and was able to do some searches. However, when I checked searching partial words, it of course does not work(unless the partial word just happens to be the indexed version). IMHO,...
|
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 will then be used to perform
weighted searches on the keywords and text of multiple MSWord documents. How
might this best be accomplished? Should I perform Full Text Searches on the
Word files or store the data in a database (by coping and pasting...
|
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 'load_os_resources', 1;
exec sp_fulltext_service 'verify_signature', 0;
go
I got error:
|
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. Suppose that
homework counts 10%, quizzes 20%, and tests 70%.
If Pat has a homework grade of 92, a quiz grade of 68, and a test grade
of 81, then
| |
by: alessandro.carrega |
last post by:
In Igraph library (http://cneurocvs.rmki.kfki.hu/igraph/) there's a
method to add a weighted edge?
|
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 LIKE '%' + #keywords.keyword + '%'
But I can not seem to do this using the CONTAINS syntax.
eg.
|
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 indexed).
dbo.maintable(ProfileID int pk)
dbo.fts_table(ProfileID int pk fk, col1 xml, col2 xml, col3 xml)
I want to perform a query that will return any rows that contain ‘x’
and ‘y’ in any columns. I.e. ‘x’ could be in col1 and ‘y’ could be in
|
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 got errors of Failed to
open file ./outdir/mytestout.txt. Below is the code:
#include <stdio.h>
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |