Questions tagged [match-against]

133 questions
12
votes
1 answer

What is the maximum possible value range of MATCH ('...' IN NATURAL LANGUAGE MODE) in MySQL?

MySQL provides FULLTEXT indexes, that can be retrieved with the MATCH (col1,col2,...) AGAINST (expr [search_modifier]) construct. There are several Full-Text Search variants, one of them (and the default one) is the Natural Language Full-Text…
automatix
  • 10,950
  • 17
  • 85
  • 198
11
votes
4 answers

How to check against all joins when generating a score using MYSQL

I'm using MYSQL to generate a score for each result returned by a query. The results are then ordered by the score. The part that doesn't seem to be working properly is when I'm trying to add a score for each tag that has been searched and the…
Martin Hunt
  • 995
  • 2
  • 13
  • 22
11
votes
2 answers

Mysql search for string and number using MATCH() AGAINST()

I have a problem with the MATCH AGAINST function. The following query give me the same result: SELECT * FROM models MATCH(name) AGAINST('Fiat 500') SELECT * FROM models MATCH(name) AGAINST('Fiat') How can I search for both strings and numbers in a…
Gambric
  • 159
  • 1
  • 1
  • 10
8
votes
2 answers

mysql match against not return case insensitive results

I have two tables: CREATE TABLE IF NOT EXISTS `test1` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `bucket_id` int(10) unsigned NOT NULL COMMENT 'folder this component belongs to', `test1_name` varchar(81) NOT NULL COMMENT 'Name of this…
ppetree
  • 782
  • 3
  • 14
  • 29
6
votes
3 answers

Full text query with a single quote

I'm having a problem when I try to do a full text search in boolean mode using a string with a single quote and an asterisk wildcard, i.e. "levi's*": it seems to search also for all words beginning with "s", like "spears", when, as far as I know,…
Borgtex
  • 3,059
  • 1
  • 16
  • 23
4
votes
1 answer

Grouping a comma separated value on common data

I have a table with col1 id int, col2 as varchar(comma seperated value) and column 3 for assigning group to them. Table looks like col1 col2 group .............................. 1 2,3,4 2 5,6 …
user1285324
4
votes
2 answers

MySQL MATCH() AGAINST() FULLTEXT Index - Achieve Partial String Match Combined with Phrase Match

I have a table with column content that has a FULLTEXT index. I want to take advantage of the speed of MATCH() on large text. I want the search to be as accurate as possible. When I search for the phrase string "large truck" this way: SELECT * FROM…
user8588978
4
votes
1 answer

MySQL: ORDER BY clause slows down MATCH AGAINST search

I have the following MySQL query: $sql = "SELECT (SELECT COUNT(share_id) FROM pd_shares WHERE section = 'news' AND item_id = news.article_id) AS count_shares, article_id, link, title, publish_date, description, source FROM pd_news AS news WHERE…
Gregory R.
  • 1,475
  • 1
  • 16
  • 28
4
votes
2 answers

Prepending an * (asterisk) to a Fulltext Search in MySQL

I understand that the asterisk is a wildcard that can be appended to the end of fulltext search words, but what if my searched keyword is a suffix? For example, I want to be able to search for "ames" and have a result that contains the name "james"…
Colin
  • 2,242
  • 3
  • 28
  • 42
4
votes
1 answer

subquery (Incorrect arguments to AGAINST) using Mysql

When I execute this query with MATCH AGAINST using MySql (see Query 1st) the issue in this query they has generated an error like this (see error) or when I execute the same query with = they executed normally(see Query 2nd). My question is what…
Query Master
  • 6,491
  • 3
  • 30
  • 51
3
votes
1 answer

How to get same effect as like %someword% with match-against in MySQL with using solr etc

Possible Duplicate of: How to use prefix wildcards like '*abc' with match-against But i cannot find my answer so asked this question sorry for the duplicate. I am performing a query in MySQL Records are : I am john doe. John doe is a man. John last…
shery089
  • 594
  • 10
  • 18
3
votes
2 answers

Mysql Match Against query - display matched keyword in the result

Not sure if this is possible I have a bunch of 100 keywords and I'm running a MATCH AGAINST query to see if those keywords are present in the table - The query works fine: SELECT * FROM questions_new WHERE MATCH (question_title,question) AGAINST…
Gublooo
  • 2,400
  • 7
  • 48
  • 87
3
votes
2 answers

MySQL - Issue with FULLTEXT search with specific search value 'course'

I have created below table. CREATE TABLE `test` ( `name` VARCHAR(50) NOT NULL, `id` INT(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), FULLTEXT INDEX `name` (`name`) ) COLLATE='utf8_general_ci' ENGINE=MyISAM; with following data insert into test…
user1285252
  • 117
  • 2
  • 8
3
votes
3 answers

How to search a word in MySQL table? MATCH AGAINST or LIKE?

I have a table for some companies that may have many branches in different countries. These countries are inserted in countries field. Now, I have to make a searching system that allows users to find companies that have any branch in a specific…
Mohammad Saberi
  • 11,594
  • 23
  • 65
  • 123
2
votes
2 answers

Mysql MATCH AGAINST short words

I want to display relevant products on a page. I use the following query: SELECT item.*, MATCH (item.title) AGAINST ('M' IN BOOLEAN MODE) AS relevancy FROM __items AS item ORDER BY relevancy DESC The table __items has a few items (id, title) and…
Bert
  • 785
  • 2
  • 5
  • 16
1
2 3
8 9