fulltext

MySQL Fulltext search against column value?

I need to do a Fulltext search for a whole bunch of values out of a column in another table. Since MATCH() requires a value in the AGAINST() part, a straightforward: "SELECT a.id FROM a,b WHERE MATCH(b.content) AGAINST(a.name)" fails with "Incorrect arguments to AGAINST". Now, I know I could write a script to query for a list of names ...

How can I select MySQL fulltext index entries for automplete functionality?

Is there a way to select entries from fulltext index in MySQL? ...

Sql Server 2005 Fulltext case sensitivity problem

I seem to have a weird bug in Microsoft SQL Server 2005 where FREETEXT() searches are somewhat case-sensitive despite the collation being case-insensitive (Latin1_General_CI_AS). First of, LIKE queries are perfectly case-insensitive, so WHERE column LIKE '%word%' and WHERE column LIKE '%Word%' return the same results. Also, FREE...

MySQL Fulltext keyword order?

I am making a little search algorithm at the moment, and I am wondering if MySQL fulltext searches weight keywords in order of appearance? For example: Search Term: php macaroni pizza custard In a fulltext search, is PHP more "relevant" than custard? Or are they both equal? ...

MySQL fulltext with stems

I am building a little search function for my site. I am taking my user's query, stemming the keywords and then running a fulltext MySQL search against the stemmed keywords. The problem is that MySQL is treating the stems as literal. Here is the process that is happening: user searches for a word like "baseballs" my stemming algorithm...

Why is this SQL script failing?

Hi, I'm trying to run a SQL script against SQL Server 2005 as part of the set up for my integration tests. The script works perfectly fine if I execute it from within SQL Server Management Studio. However, when executing programmatically, this part of the script that enables full-text search refuses to work: -- lots of tables and index...

Proper mysql datastructure for a fulltext search...

Hoping someone can provide some mysql advice... I have 2 tables that look like this: searchTagsTable ID tag dataTable ID title desc tagID So the column "tagID" in "dataTable" is a comma-delimmited string of ids pointing to searchTagsTable. I'd like to use mysql's built in fulltext search capabilities to sear...

Fulltext search with rich media files.

Hi all, What's the best way to perform fulltext searches across rich media files? I'm trying to implement a system where the user could upload random files (.doc, .pdf, .jpg, ...) and down the line, he would be able to search for them based on the file contents or metadata. I would appreciate some ideas on how to build this. PS - I st...

How to do fulltext search with doctrine?

WHERE column = value ->add(column, value); WHERE column <> value ->add(column, value, Criteria::NOT_EQUAL); Other Comparison Operators > , < Criteria::GREATER_THAN, Criteria::LESS_THAN >=, <= Criteria::GREATER_EQUAL, Criteria::LESS_EQUAL IS NULL, IS NOT NULL Criteria::ISNULL, Criteria::ISNOTNULL LIKE, ILIKE Criteria::LIK...

AND statement for multiple columns in fulltext index

I have a fulltext indexed table and try to query for results matching multiple words. E.g. I have a address table with the indexed columns address_text, zip_code and city. | ROW | address_text | zip_code | city | | 1 | Bourbon street | 1234 | Baltimore | | 2 | Bourbon street | 1234 | New Orleans| Now I want t...

Alternative MySQL fulltext search syntax

If you want the relevance and also the results to be sorted by relevance the common format of a FULLTEXT query is: SELECT name, MATCH(name) AGAINST('Bob') AS relevance FROM users WHERE MATCH(name) AGAINST('Bob') As a developer I always like to make my code DRY(don't repeat yourself). Is there any reason not to write the query as: SEL...

How to make MySQL treat underscore as a word separator for fulltext search?

I am using MySQL fulltext and PHP (codeigniter) to search a database containing RSS items. Problem is some of these items's titles use underscores instead of spaces. Since MySQL considers underscores as part of a word, these items will never be matched in the search, unless the user types the exact title including underscores. Server is...

mysql composite indeces should i be using them

I got question on index strategies for mysql - mainly when to use a composite index I have a fairly common relational db scenario, heres my table set up: Maintable - table consisting of "products" including brandid, merchantid So I create a table to store the brands and merchants Brandtable - brandname, brandid Merchanttable - merc...

MySQL fulltext query: search:ipod (DONT want tripod) but search:dg43nb (DO want box43nb)

Heya I need help with my MySQL product search query. Overall I'd appreciate any critique / tweak suggestions, more importantly though I have an issue.. I implemented this to stop people searching: "ipod" & getting "tripod" at the top of the list.. now my issue.. search for "dg43nb" I get 0 results but should get title:"BOXd43nb" So ...

MySQL Fulltext Stopwords Rationale

I am currently trying to develop a basic fulltext search for my website, and I noticed that certain words like "regarding" are listed as stopwords for MySQL fulltext searches. This doesn't bother me too much right now since people searching for a given news item wouldn't necessarily search using the word "regarding" (but I certainly can...

Extra fulltext ordering criteria beyond default relevance

I'm implementing an ingredient text search, for adding ingredients to a recipe. I've currently got a full text index on the ingredient name, which is stored in a single text field, like so: "Sauce, tomato, lite, Heinz" I've found that because there are a lot of ingredients with very similar names in the database, simply sorting by rele...

How to search multiple columns in MySQL?

I'm trying to make a search feature that will search multiple columns to find a keyword based match. This query: SELECT title FROM pages LIKE %$query%; works only for searching one column, I noticed separating column names with commas results in an error. So is it possible to search multiple columns in mysql? ...

MySQL - Fulltext Index Search Issue

Hi all, Two rows in the my database have the following data: brand | product | style ================================================= Doc Martens | Doc Martens 1460 Boots | NULL NewBalance | New Balance WR1062 SG Width | NULL Mininum word length is set to 3, and a FULLTEXT index is created across all ...

Searching with FullText in SQL Server 2005

I have a search that uses fulltext searching in SQL Server 2005 to do exact matches first, then does partial matches, etc... However, the way I'm doing it seems overkill... I basically need to do an exact match against a Title, keyword & a whole load of other fields (I've not put them in the examples below), but the order for search res...

"Did you mean" feature on a dictionary database

I have a ~300.000 row table; which includes technical terms; queried using PHP and MySQL + FULLTEXT indexes. But when I searching a wrong typed term; for example "hyperpext"; naturally giving no results. I need to "compansate" little writing errors and getting nearest record from database. How I can accomplish such feaure? I know (actua...