Currently, I am using this query, which does a pretty good job of finding the most relevant results and ordering by "most relevant" first:
SELECT *,
MATCH(text) AGAINST('$keyword') AS score
FROM table_name
WHERE MATCH(text) AGAINST('$keyword')
ORDER BY score DESC
LIMIT $s, 20
Which produces results like:
text ...
Hello,
I have tried to use mysql fulltext search in my intranet. I wanted to use it to search in multiple tables, and get the independant results depending on tables in the result page.
This is what i did for searching.
$query = "
SELECT *
FROM testtable t1, testtable2 t2, testtable3 t3
WHERE match(t1.firstNa...
I am trying to create an index on a VarBinary(max) field in my SQL Server 2008 database.
The steps I am taking are as follows:
Table: dbo.Records
Right click on table and select "Full Text Index"
Then select "Define Index..."
I choose the primary key which is the PK of my table (field name Id, type UniqueIndentifier).
I then get the ...
I am trying to perform a search for documents within a SharePoint site, but I need to apply audience targeting to the results before they are displayed to the user.
I am however struggling to either (a) retrieve the target audience settings within the original query...
using (SPSite site = new SPSite(SPContext.Current.Site.ID)) {
u...
I'm trying to extract text from PDF files using an iFilter.
The Adobe PDF iFilter that is distributed with Adobe Reader is awful, returning HRESULT E_FAIL messages for many PDF documents.
The FoxIt PDF IFilter works beautifully on virtually all of the PDFs I've been using for testing.
The problem is that every time the Adobe Updater...
I have simple tbl_posts table with three columns (id, name, content)
I created fulltext index for name and content columns.
When I query it like:
SELECT *
FROM dbo.tbl_posts
WHERE FREETEXT ( *, 'search word' )
I want that the order for results will be ordered first by rank in column name and then my content
...
I am trying to add full text search capabilities to my RoR app, but facing some issues when it comes to Arabic. AFAIK, there aren't many search engines out there that support arabic stemming, morphology and other advanced full text search. The only thing I found was Lucene with the AraMorph tokenizer.
The acts_as_solr plugin (solr is ba...
We currently have in production SQL Server 2005 and we use it's full text search for a eCommerce site search of a million product database. I've optimized it as much as possible (I think) and we're still seeing search times of five seconds.
(We don't need site scrawl or PDF (etc.) document indexing features... JUST "Google" speed for s...
Hi all,
I have a fulltext index which doesn't need to be immediately up-to-date, I'd like to spare myself the I/O (when I do bulk updates, I see a ton of I/O related to the index) and do the index updates during low usage times (nightly, perhaps even weekly). It seems there are two ways to go about this:
Turn off change tracking (SET...
In the database I have a field with a .mht file. I want to use FTS to search in this document. I got this working, but I'm not satisfied with the result. For example (sorry it's in dutch, but I think you get my point) I will use 2 words: zieken and ziekenhuis. As you can see, the phrase 'zieken' is in the word 'ziekenhuis'.
When I searc...
Hi
I know that as3 has some powerful new text search capabilities, especially when combined with regex.
I don't even know if this is possible, but I would like to somehow, search any block of text, and return all nouns, adjectives and verbs.
What would be the best(most efficent) way to do this?
Is regex an option?
or would I have to lo...
I am trying to index a table for full text search in a SQL server 2005.
When I select the change tracking as Automatic and click on the next button, I get the following error
TITLE: Microsoft SQL Server
This wizard will close because it
encountered the following error:
For help, click:
http://go.microsoft.com/fwlink?P...
I've got a function written by another developer which I am trying to modify for a slightly different use. It is used by a SP to check if a certain phrase exists in a text document stored in the DB, and returns 1 if the value is found or 0 if its not. This is the query:
SELECT @mres=1 from documents where id=@DocumentID
and contains(...
I have a text column in a table. We store XML in this column. Now I want to search for tags and values
Example data:
<bank>
<name>Citi Bank</name>
.....
.....
/<bank>
I would like to run the following query:
select * from xxxx where to_tsvector('english',xml_column) @@ to_tsquery('<name>Citi Bank</name>')
This works fine...
For some unknown reason I'm running into a problem when passing a variable to a full text search stored procedure performs many times slower than executing the same statement with a constant value. Any idea why and how can that be avoided?
This executes very fast:
SELECT * FROM table
WHERE CONTAINS (comments, '123')
This executes ver...
I'm working on a search feature for my application, I want to search all articles in the database. As of now, I'm using a LIKE in my queries, but I want to add a "Related Articles" feature, sort of like what SO has in the sidebar (which I see as a problem if I use Like).
What's better to use for MySQL searching, Fulltext or Like... or a...
I would like to implement a search function in a django blogging application. The status quo is that I have a list of strings supplied by the user and the queryset is narrowed down by each string to include only those objects that match the string.
See:
if request.method == "POST":
form = SearchForm(request.POST)
if fo...
I'm doing a Sphinx search but turning up some really weird results. Any help is appreciated.
So for example if I type "50", I get:
50 Cent
50 Lions
50 Foot Wave, etc.
This is great, but when I search "50 Ce", I get:
Ryczące Dwudziestki
Spisek
Bernhard Gal
Cowabunga Go-Go
And other crazy results. Also when I search for "50 Cent",...
I have some questions about SQL 2K8 integrated full-text search.
Say I have the following tables:
Car with columns: id (int - pk), makeid (fk), description (nvarchar), year (int), features (int - bitwise value - 32 features only)
CarMake with columns: id (int - pk), mfgname (nvarchar)
CarFeatures with columns: id (int - 1, 2, 4, 8, et...
Is there a way to query a full text index to help determine additional noise words? I would like to add some custom noise words and wondered if theres a way to analyse the index to help determine suggestions.
...