Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Full Text Searsh Doesnt Work


I am trying to do a Full text search, but I have two problems.

1. If I enter a word that is found under multiple entries, I get no return. But it i search a word tha's only under one enetry, then it works.

2. This query works:
PHP

SELECT * FROM `site` WHERE MATCH (site_name,keywords) AGAINST ('mice') AND `approved`=Ƈ'

, but when I add WITH QUERY EXPANSION, it doesnt work.

PHP

SELECT * FROM `site` WHERE MATCH (site_name,keywords) AGAINST ('mice' WITH QUERY EXPANSION) AND `approved`=Ƈ'

I get this error:


MySQL said:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WITH QUERY EXPANSION ) AND `approved` = Ƈ'
LIMIT 0, 30' at




View Complete Forum Thread with Replies

Related Forum Messages:
Function Doesnt Work
i tried write simple function:

CREATE FUNCTION `getLastNumber`(some_guy INT(50), date DATE) RETURNS float
BEGIN
DECLARE a FLOAT;

SET a = NULL;

SELECT number INTO a FROM numbers p WHERE p.number_owner = some_guy AND p.date_created <= date ORDER BY p.date DESC LIMIT 1;

RETURN a;
END

that would return last inserted number into table for some person. When some_guy has number in table, then is everything ok and it returns last number, but when some_guy does not have row in table it returns: Query OK, -1 rows affected. Pls why? and how to fix it?

View Replies !
GROUP BY Doesnt Work
i have a table that contains the folowing fields:

some_table:

company_number
something_number
price
date_price_established

for a certain company i need to get all the dates that prices were established. and i dont want any date_price_established to repeat themselfs.

for example, for the following database:

1,1,15.5,1.1.2006
1,1,16,1.1.2006
1,1,17.5,1.1.2006
1,1,16,3.1.2006

the results will be : 1.1.2006, 3.1.2006.

this is what i've tried:

SELECT date_price_established
FROM myDb.some_table
WHERE company_number = 1
GROUP BY date_price_established";

View Replies !
Domain Name Now Doesnt Work
I have a software script I had installed on my server that works with a mysql database. It was working fine as far as pulling information from the database under my old domain name, however, I changed to a new domain name as primary on my server and now the database does not pull anything into the template.

I know this is probably simple but not sure how to fix this.

View Replies !
Where Clause Doesnt Work
im creating a website with a mysql database. ive jus got started. im havin a few problems
i have a product table and i execute a simple query but it doesnt seem to give me any results: heres the query:

Select * from product where ProductName = 'Age of Empires III';

the above query doesnt work but this 1 does
Select * from product where ProductName LIKE 'Age%';

View Replies !
Mysqldump Doesnt Work
i try to insert the followind data to mysql database
mysqlimport -u root -p anaktisi2 < phpbb_db_backup.sql

But this doesnt insert anything in the db.

View Replies !
Full Text Index And Full Text Search On Several Columns And Indivdiual Columns
1. Say if I want to do the full text search on three columns, "title", "description", "keyword". The search could be done only on one column, or combine any two columns, or combine all three columns, do I need to create full text index for all these possiblilities, like full text index on each column, and then full text index on any two columns and then full text index on all three columns?

If I have to make so many different kind full text index, that will slow my database performance or not?

2. Will the relevance also be calculated based on which column, such as the "title" will have higher relevance than "keyword", the "keyword" will have higher relevance than "description"?

View Replies !
Full Outer Join Should Work
why doesn't the following work?

mysql> select * from girls full outer join boys where girls.city = boys.city;

where :

drop table girls;
drop table boys;
create table girls (name varchar(12), city varchar(12));
create table boys (name varchar(12), city varchar(12));
insert into girls values('Mary', 'Boston');
insert into girls values('Nancy', null);
insert into girls values('Susan', 'Chicago');
insert into girls values('Betty', 'Chicago');
insert into girls values('Anne', 'Denver');
insert into boys values('John', 'Boston');
insert into boys values('Henry', 'Boston');
insert into boys values('George', null);
insert into boys values('Sam', 'Chicago');
insert into boys values('James', 'Dallas');

If needed, I can go into insert and create for you!

BTW left and right work OK!

BTW what do P1(T1,T2), P1(T1,T2) and R( mean in the following

SELECT * T1 LEFT JOIN T2 ON P1(T1,T2)
WHERE P(T1,T2) AND R(T2)

View Replies !
Full Text Search - Whats Best Text Or Varchar Or Both
I'm creating a search script in perl using the FullText Engine of MySQL.

The table has one field with one kind of description thats a type VARCHAR and another field with a longer description of type TEXT.

Whats better for performance to search over the two fields or or merge the value in the VARCHAR field with the value in TEXT field and just search over
one field the TEXT one.

View Replies !
Full-Text
I'm having a problem using Full-Text index.

My db is being hosted on a normal web hosting service.
They are using MySQL version : 4.1.13-standard

Now, I created a table, with some text/vchar/char fields.
I added to this table a full-text index that is using only the text/vchar/char fields.

When i send a query, for some words it works fine, and for some (that absolutly appears inside those fields) - i get no results.

I tried to use " SELECT * FROM tbl WHERE txt LIKE '%abc%' " and recieved many records back.
I used the same word ("abc" for exm.) in MATCH-AGAINST query, using the currect fields order (as defined in the full-text index), and i got none.

I must say again : for some words i receive perfect results, but for some, that are ablolutly part of the field(s) content i get nothing.

View Replies !
FULL-TEXT Vs. LIKE
I'm attempting to write a simple search for a website I'm developing. Basically, the search will look for matches in "artist_name" and "album_title" in my table, "music". Simple enough, no?

Which search method is more effective, FULL-TEXT indexed searching or simply using LIKE in my MySQL query? Note that the table will eventually have thousands if not tens of thousands of rows.

From what I've read, FULL-TEXT appears to be geared towards searching for text in longer articles, whereas the most my MySQL fields will contain is a couple of words.

I wrote a quick script using FULL-TEXT, and the results are pretty ambiguous already. I've added 5 rows of records to the table, and searching for the album "Very Fast Very Dangerous" using just the word "Very" yields zero results. I assume it's because the word occurs twice in the record. However, since this doesn't constitute over 50% of the records in the table, why is this?

View Replies !
Full Text Parameters In C#
I have to run a full-text query something like this:

SELECT id, title, url, comments, modified_date as modifieddate FROM
clips WHERE IsActive = 1 AND
MATCH(title,url,comments) AGAINST ( SEARCHTERM IN BOOLEAN MODE );

In the query the search term is user provided.I am using C# and
command parameters to run queries. Using MySQL 4.1 and MyODBC 3.51. I
can only pass query terms as?in the right order.
If I try to replace SEARCHTERM with ?it does not work. I have also tried ?SearchTerm. I
want to avoid string building to avoid sql injection.

View Replies !
Full-Text For InnoDB
As far I remember full-text doesn't work with utf-8. Anybody knows the
estimated time when it will be supported ?? I next few months 4.1
version will be ready to use (I hope so...) and I wish to use utf-8
charsets, but very important issue is full-text search.

I'm also curious with InnoDB support for Full-Text search.

View Replies !
Full Text Practices
I am looking for information on the proper way to code full text queries and
more information on how they work.

I am especially interested in how to code for multi word queries...

for example :

Searching for : 'today is the day'

Select * from table1 where match field1 against ('today is the day' IN
BOOLEAN MODE) ????
Select * from table1 where match field1 against ('today or is or the or day'
IN BOOLEAN MODE) ????

What is the difference between using or not using IN BOOLEAN MODE?
What is the best way to allow people to also search for "today is the day"
in quotes--- literal string...

View Replies !
Full-text Query
This query turns too many repeat results...any idea where I went wrong?
Code:

$query = "SELECT review.id, SUBSTRING_INDEX(review, ' ', 6) as review, source, SUBSTRING_INDEX(summary, ' ', 5) as summary, review_item_id, review_items.item_name, date_format(date_added, '%M %d, %Y') as date_added, rating, review_users.username, MATCH(review.review, review.summary)
AGAINST ('$search_term') AS score FROM review_items, review_users
left join review
on (review.review_item_id = review_items.item_id)
WHERE MATCH(review.review, review.summary)
AGAINST ('$search_term')
";



View Replies !
Full Text With Same Column Name
I have 2 tables, tableA have a full text column with (title, description & value_id), tableB have some column and also a field named as value_id

but when i do inner join:
select * from tableA a
inner join tableB b on a.id = b.id
where MATCH(`title`, `description`, `value_id`) against ('xxxx')

Then i hit an error:
Error Code : 1052
Column 'state_id' in where clause is ambiguous

Anyone how can i do inner join with fulltext table that contains the same field name?

View Replies !
Creating Full Text
I have created my indexes but I can't get them to work. I am not sure what to do with indexes.

I have a primary index key that is assigned the field "itemID" and then a FULLTEXT index that is assigned the fields "itemName" and "itemDesc". When I try this SQL:

 SELECT * FROM items WHERE MATCH(itemName, itemDesc) AGAINST ('bag') 

I get 0 rows returned (there is no error though, just an empty result set) on this and I know there are at least 20 items that match the string "bag" on those columns.
Have I totally misunderstood how to create indexes?

View Replies !
Relevance, Without Full Text
I would like to display results sorted by relevance, but not necisarily using fulltext.
basically, what I am trying to achive is this. a user wants to add a new client to the system, so they enter the first and surname in a single field. i want to then query the client table and show them any exact or close matches to the data they entered...
so if they entered John Smith, the following page would show them all the John Smiths in the database, then all the other Smiths and all the other Johns, in that order.
I am currently using WHERE fname LIKE %John% OR sname LIKE %John% OR sname LIKE %Smith% OR fname LIKE %Smith%, which gives me the correct reulsts but not ordered in the way I want.

View Replies !
Full Text Index Not Being Used?
I have a fulltext index based on 4 string columns within a table; when I run an EXPLAIN on the following query that contains a where clause using those 4 columns, the possible keys are null (no keys/index will be used). Why is this since the fulltext index exists?

Query:
explain select id, firstname, lastname, address, city from ispmain where
match (lastname, firstname ,address ,city) against ('jones' IN BOOLEAN MODE)

Fulltext index, idx_full, created on the following columns:
lastname, firstname, address, city

The id column in the select is the primary key, but it doesn't make any difference whether or not I include this in the select it still will not use the defined fulltext index.

View Replies !
Full Text Search
An example of the select is "select nome, nascimento from table clientes where match(nome) against('ricardo')>0.01 and match(nome) against('medeiros')>0.01 limit 100"
Details: the min_word_len is 2 and I has repaired the table after restart de server.

View Replies !
Full Text Search On 4/4
I'm searching a music data table where sizes are stored in the field being searched on as 4/4, 3/4 etc.

The Full Text boolean search works fine with just text but when I use 4/4 as a search string no results come up though they are found in the field searched on.

View Replies !
Full Text Indexing
Are their any plans to support full text indexing in innodb tables

View Replies !
Need A Full Text Search
In phpMyAdmin, a search screen comes up with the following text. I want to offer a full text search capability for my db identical to the search script using the following screen in phpMyAdmin.

Search in databaseWord(s) or value(s) to search for (wildcard: "%"):
Find: at least one of the words1

all words1
the exact phrase
as regular expression

1Words are separated by a space character (" ").
Inside table(s): ViewNow
Select All / Unselect All

My phpMyAdmin version: phpMyAdmin 2.8.0.1

Fields in the db are::
Source: text
Topic: varchar(255)
Subtopic: longtext
References: longtext
ArticleRefs: longtext
Theswords: longtext
Lnum: int(11)

View Replies !
Full-Text Searching
MySQL full text searching on a database containing words with proper apostrophes (’) or other special characters (ä etc) doesn't seemt to work. Example:
Input: O’Reilly

SQL: SELECT * FROM catalogue WHERE id !='' AND (1=2 OR MATCH fname AGAINST ('O’Reilly') OR MATCH lname AGAINST ('O’Reilly'))
Results: some have just REILLY, others don't seem to be related at all except for having a O,' or "
Additionally if you enter O'Reilly (') it doesn't return the ones with proper apostrophes (’)

View Replies !
Full Text Search Help!
Having big time problems with my full text search on my site. Think its a pretty easy one though for you PHP gurus

The following query does not bring back any records but they are definitely there!! For example the category field contains the words "Designer Men" and the brand is "Duck And Cover" (in the mySQL db). This code is a direct copy of another query but for "ladies ladie women women's" and it works prefectly this is why i do not understand it!!

Here is the offender:

PHP

$num3 = getPORProducts("SELECT * FROM por WHERE MATCH(longDescription, category, description, brand, name) AGAINST('+"Duck &amp; Cover" "Duck and Cover" "Duck & Cover" +(mens men's men)' IN BOOLEAN MODE)");

p.s. to save you some time the problem is definitely with the code above, and has nothing to do with the functions i have created.

View Replies !
Boolean Vs Full-Text
I have set up a full index on a table to enable me to create a simple MySQL search engine. However, there are two modes: boolean and full-text mode. Full-text mode seems to be pulling up more relevant results, but boolean doesn't. The only difference I see is that you can use +, >, <, -, and other various operators in boolean mode, but not in full-text mode.

Why does boolean mode pull up less results?

To my knowledge, full-text mode (or "normal mode") just counts the number of words in found in the column(s) you're searching in and scores it. Are there any disadvantages of using full-text mode compared to boolean mode? I'm considering throwing away boolean mode completely, because I highly doubt that visitors will use the operators or commands, they just want the results.

View Replies !
Full Text Search Help
I have a testing database with 28000 records and video keyword appear in 11000 records....I have FULL text index on three columns title,tags and notes

but the query is really slow....any help

select title,tags,link,description MATCH (title,tags,description) AGAINST ('video') AS score from videotable MATCH (title,tags,notes) AGAINST ('video') order by score DESC

The index works fine and table is small but the query is very slow.........I am very new to full text search

View Replies !
Full Text Or LIKE Search
I'm coding a simple search system for my blog (see my sig.) and I cannot decide which to use Fulltext or LIKE searches. Fulltext searches look more advanced (indexing, relevancy score etc.) but they don't support (do they?) similar keywords like "play", "plays" , "player" for instance.

Since my rows contain relatively little data for this site, I think I'll use LIKE searches in this way:

-First a 'word match' search with query string: ' '.string.' '
-Then a second search with: string (results listed after the first search's results).

Well, do you think this is a good way to take. Any suggestions? Performance/speed problems in the long run?

View Replies !
Full Text Search & Innodb
I have a question : Why the "Full Text Search" is not implemented in InnodbMySQL.

View Replies !
Full-text Score Returning 0
I'm using mysql 4.1.7 on one machine and 4.1.9 on another, and on both I'm
having trouble returning a score on a full-text index. The following
returns 26 records and all scores of 0:

SELECT article.title, article.article_id,
MATCH (body,subtitle,summary,title)
AGAINST ('church') AS score
FROM article
WHERE MATCH (body,subtitle,summary,title)
AGAINST ('church' IN BOOLEAN MODE)

and

SELECT article.title, article.article_id,
MATCH (body,subtitle,summary,title)
AGAINST ('churches') AS score
FROM article
WHERE MATCH (body,subtitle,summary,title)
AGAINST ('churches' IN BOOLEAN MODE)

returns 9 records and actual scores. The word "church" is found in many
titles and bodies, and so it should have scores?

View Replies !
Full Text Not Returning Any Results
I'm having some issues with my full text indexes in MySQL 3.23.58. I'm
using I have a table with a full text index on the 'content' column.
There are some words that are returning results just fine but others
that should return results aren't.

For example,

SELECT * FROM lift_content WHERE match(content) AGAINST('content')
returns results just fine.

SELECT * FROM lift_content WHERE match(content) AGAINST('gangs')
doesn't return any results when there are rows that have the word
'gangs' in it.

Any thoughts on why certain words aren't returning results when they
should, and aren't included in the stopword list?

View Replies !
Full-Text For InnoDB & Unicode
As far I remember full-text doesn't work with utf-8. Anybody knows the estimated time when it will be supported ?? I next few months 4.1 version will be ready to use (I hope so...) and I wish to use utf-8 charsets, but very important issue is full-text search.

I'm also curious with InnoDB support for Full-Text search.



View Replies !
The Logic Of Full Text Search
I am trying to understand the logic of full text search in mysql. I'm not using mysql 4. The search work OK, be it thast I get hits on certain words, whilst other words are discarded for some reason or other. Why is that. An example: I search in a text field for the word organisation. I get hits. When I search for the word scenario nothing is found. But I can see the word in the paragraphs by myself?

View Replies !
Logic Of Full Text Search
I am trying to understand the logic of full text search in mysql. I'm not using mysql 4. The search work OK, be it thast I get hits on certain words, whilst other words are discarded for some reason or other. Why is that. An example: I search in a text field for the word organisation. I get hits. When I search for the word scenario nothing is found. But I can see the word in the paragraphs by myself?

View Replies !
Advanced Full Text Search
I'm not by anymeans a MySQL expert because I usually work with enterprise type db's. Anyways, I'm currently working on a search engine for an adult advertising network using MySQL. I am going to employ full text searching but so far, it has fallen pretty short of my expectations. Just a few problems I've run into:
1) If a user searches for "download" and a listing contains "downloads" (plural) no match is made. Or if someone searches for "on line" but a listing contains "online" again, no match is made.
2) Certain sites may show up higher in score because they worded their descriptions better (I would like to factor in a few other things into determining relevancy).
These are my main two problems. If anyone has any info regarding the first problem, that would be great.
As far as the second problem goes, I would like a way to factor in overall network traffic as well (hits in/out). If I was working with oracle I would be a little more familiar but seeing as the buyer of this product is not going to be a large company, its gotta be written for MySQL.

View Replies !
Full-Text Searching Difference
Where's the difference in full-text searching in Mysql 5.0 (from version 4.1). Differences in behavior, conventions used, syntax, etc. etc.
From what I have observed (very rapidly though and no testing), there are no differences at all. Is this true

View Replies !
Full Text Boolean Searches
I am trying to learn how to do full text searches. I am a bit confused how to do multiple tables. I know the below sql is not correct...but could someone give me some ideas on which way to go.

SELECT DISTINCT Roster.RosterID AS RosterID
FROM Roster INNER JOIN Photos ON Roster.RosterID = Photos.RosterID INNER JOIN Users ON Photos.UserID = Users.UserID INNER JOIN Roads ON Roads.RoadID = Roster.RoadID
MATCH (Roster.LocoID, Roads.RoadID, Roster.Model, Roster.SerialNumber, Roster.FrameNumber, Roster.Lineage, Roster.Notes, Photos.City, Photos.State)
AGAINST ('+ATSF' in boolean mode)

View Replies !
Full Text Search Engine
I'm running MySQL 3.23 and am designing a basic search engine. I've setup a concatenated full text index on two fields and have the search working fairly well.

In effort to make it more robust, i want to have wildcard capabilities in the search phrase but how do i do this with the match against command? I've tried using a REGEXP but i don't think that's supported because it errors out. The sql wildcard character "%" seems to be taken literally. I know it would probably help to upgrade to 4.x so i could get boolean mode, but this is not possible for me right now.

View Replies !
Full Text Search Using Boolean
I'm trying to get a decent search facility running that uses boolean type operators, my current SQL is below, can anyone advise how I need to change it?
Do I need to use MATCH, or something else?

SELECT batemans.LotNo, batemans.A, batemans.Description, batemans.LowEst, batemans.HighEst, batemans.SaleNo, sale_dates.Date
FROM batemans LEFT JOIN sale_dates ON batemans.SaleNo = sale_dates.SaleNo
WHERE batemans.Description LIKE '%varDescription%' AND batemans.SaleNo LIKE '%varSaleNo%'

varDescription & varSaleNo are sent through the URL from the search page.
The Description field in the DB is VARCHAR 250. This is the field that needs to be able to accept the boolean type search.PS At the moment if I seach for 'silver candle' it'll only return those records that have 'silver' and 'candle' next to each other in the text, not anywhere in that table field.


View Replies !
Full TEXT Indexes Error
whenever i try to install Minerva, a phpBB2 CMS, i get the error message that the FULLTEXT indexes dont exsist and that it cant create the files. Why?

View Replies !
Performance Using Full Text Search
i have a shopping portal in which we data coming from different merchant on web of there products in CSV format. the CSV of the product come in standard Structure from all the merchant. we get these CSV at same time schedule everday. so the product table is formed everyday. we have another table called category , in which we have categoery and have aditional field to which store the filter value to fetch the product from the products table. like camera is a caegoery name and the filter will contain the keyword to fetch product from product table , as product table contain all type of product.

the product table can have product from 20 M to 200 M product. so if use full text search , will having the performance issue. my current database structure is as follows : ...

View Replies !
Row Counts In Full Text Queries
for the purpose of paginating, I get a total row count for the calculations of page navigation with something like this:
Quote:
SELECT count(*) AS row_count FROM active_content WHERE cat_ID = '$cat_ID'"
After this, I can run the content query. This works OK when grabbing obvious records like everything in a certain category. But with full-text searching, the row count varies depending on search terms.

So, how do I incorporate the count(*) AS row_count into a full-text query like this:
Quote:
SELECT *, MATCH($table_fields) AGAINST ('$search_terms' IN BOOLEAN MODE) AS score FROM $table_name WHERE MATCH($table_fields) AGAINST ('$search_terms' IN BOOLEAN MODE) ORDER BY score DESC

View Replies !
FULL TEXT SEARCH (BOOLEAN)
Recently I was learning some thins to make search using FULL TEXT SEARCH in BOOLEAN METHOD.

I look the * operator, and in the documentation say that the operatior only work adding the operator to the end of the term.

I really need search to look words that are incomplete in the begin and/or end of the term for example:

term: 'asma' (asthma in espanish)

with operator at the "begin" and "end" like this '*asma*' can show result that have words 'plasma' and 'asmatico' both words are in spanish language.

Some idea to implement it using full text index features??

View Replies !
Full Text Search And 50% Rows
If a full text search returns more the 50% rows, it will return empty sets.

My database is relatively small.

1) How could I know that it returns the empty sets because it has got more than 50% rows, so I can inform the user that he is using a "too common" words, instead of leaving him sitting there wondering why he cannot find anything with a very popular search keyword?

2) Is there anyway I can change the rule, say if it returns 80% or 90% rows, then make it empty sets? Or turn off this 50% rules totally? Just return whatever they find?

View Replies !
Boolean Full-Text Searches
I am trying to do a boolean full text search
http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html

How do I use a boolean search to get matches to the middle of words?

In more detail.....

I have a table that called item_master and it has a column called description.
There are 5 records with entries in the description field with the word Labcoat in them.

If I search for Labcoat or L*, or La* or whatever I get the 5 responses as expected. Here is an example query:-

query= SELECT * FROM item_master WHERE MATCH (description ) AGAINST ('Labcoat' IN BOOLEAN MODE ) So far all OK.

However I wish to search for coat.

query= SELECT * FROM item_master WHERE MATCH (description ) AGAINST ('coat' IN BOOLEAN MODE ) Zero results.

I try *coat coat* *coat* +coat +coat* No matching result.

A standard query, not a boolean type search function, used a the word 'like' as a modifier. For example:- select * from item_master WHERE description like '%abc%'
and this would find labcoat. Note abc in the middle of labcoat.

So the question is How do I use a boolean search to get matches to the middle of words?

View Replies !
Boolean Full Text Search
I am in the final stages of updating a database with a system for storing keywords on images, there will be a large amount of images (maybe 20K+). The schemata below is the original idea for storing these keywords. But before I implemented the front end I had some concerns about searches. I would like it to to be somewhat Googlesk in the way a search can be performed and I can see this might be more achievable using the built in functionality that comes with a full-text search.

If the text (the keywords) are listed in a comma delineated fashion and placed in their own column in the first table (Images) what if any are the pitfalls that I would incur if I switch to using the full-text system? In order to use the system below with boolean functionality (excluding keywords and using wildcards) would have to be done through a more manual search and return then using full-text. Is my logic on this right? Would full-text searches be slower than breaking all the keywords down and storing them individually (as I do below).

I also had another questions about the minimum length of a word being searched for, I know this is set using ft_min_word_len but I am on a shared host that is set to a min of 4, my way around this would be to grab the list of keywords and then look for words that are 3 letters long and add an underscore to the word. Then tack that underscored word on to the end of the list. I don't see there being too many 3 letter words but perhaps as in my example below there will be (cat,dog,pet etc). Again, just some feedback on whether my idea is sane, and is a good way of handling the problem.

1/ Table 1: Images - with the following columns (FileName,FileName_ID,[other bits associated with the image])

Example:

spot.jpg,1053409,[vertical,500,400,bob,2008.05.05]

2/ Table 2: Keywords - with the following columns (Keyword_ID, Keyword)

Example:

103,feline
104,cat
105,dog
106,canine
107,pet

3/ Table 3 - Image_Keyword - with the following columns (Image_ID,Keyword_ID)

Example:

1053409,105
1053409,106
1053409,107

View Replies !
Full Text Search Index
I have just set up a full text search index in order to use the MATCH... AGAINST search functionality.

Working fine, but I don't know how the index gets updated as new records are added to the indexed columns. Is this automatic or manual or cron job?

View Replies !
Full Text Searching On 70,000 Records
I have a database table with 30 columns which will hold around 70,000 records. Up to 12 of the table columns will need to be searchable from a web page (PHP). There will be a drop down menu next to each search input field (title,description etc) with 2 options for searching "exact phrase" and "all words"

Searching for the "exact phrase" can be done with:

WHERE column LIKE %$user_input%;

And for "all words", I've added a fulltext index on those columns and use:

WHERE (description,title etc) MATCH AGAINST ('$user_input')

There are downsides to this fulltext searching though so I'm wondering if there is another way enable this sort of search ("all words") ?

View Replies !
Full Text Search Match And Against
I have tried to do a full-text search with the following code that doesn't work. I know the $keywords string is getting the input from the form as I've echo'd it back and if you remove MATCH(caption) AGAINST('%keywords') then the query will run off a list of all the links. So what am I missing or am I way off base? Code:

View Replies !
Full Text Search With Relevance
I have a fairly simple forum I'm learning how to create. I need to add a full text search. It will need to search by post as well as topic.
The results should be sorted by relevance.
I have both rows in my table(post, topic) and am able to post to them and see them in mysqlAdmin.

View Replies !
Full Text Search Related I Think..
Apologies if this is a common thread, I'm not quite sure how to search for my problem, although I believe it's close to a full text search.

I have strings comprised of words/spaces, let us say the words are A,B,C (These words are actually search keywords/tags). The words only appear once per string. For example the table looks like:
"A"
"A B"
"A B C"

My question is:
How do I find the most common word ("A" in this case)?
How do I find the second most common word ("B")?

View Replies !
Full Text Table Creation
i am just trying to implement fulltext .I have created the table as
CREATE TABLE `mytable` (
`mytable_id` int(25) NOT NULL auto_increment,
`mytable_title` varchar(100) NOT NULL default '',
`mytable_dts` varchar(25) NOT NULL default '',
`mytable_caption` tinytext NOT NULL,
`mytable_full_body` text NOT NULL,
PRIMARY KEY (`mytable_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Testing Full Text Search Functionality.'
is it correct or
the below is correct
CREATE FULLTEXT INDEX full_index ON mytable(
mytable_title ,
mytable_caption ,
mytable_full_body
);



View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved