Questions tagged [against]
72 questions
6
votes
2 answers
Using an overall WHERE clause when using UNIONS in sql
I am trying to return the MATCH() AGAINST() results against several tables using UNIONS, the only problem is some rows return a relevance of 0, I want to exclude these. After the unions is there a way to use 'WHERE relevance > 0'
Below is a bit of…

wiggles
- 499
- 6
- 16
6
votes
2 answers
mysql query against wildcard
I have a mysql query in php, using match / against to filter results. Im trying to get a wildcard after $string so the next character can be anything. Help?
"SELECT * FROM $table WHERE MATCH (message) AGAINST('$string%' IN BOOLEAN MODE)"

David
- 2,365
- 8
- 34
- 59
5
votes
1 answer
Can MySQL fulltext search return an index(position) instead of a score?
I would like to use the position/index found by the Match...Against fulltext search in mysql to return some text before and after the match in the field. Is this possible? In all the examples I have seen, the Match...Against returns a score in the…

Nate Starner
- 521
- 2
- 15
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
2 answers
How to plot categorical variable against a date column in Python
I have data that looks like this
Date Fruit
2017-01-01 Orange
2017-01-01 Apple
2017-01-08 Orange
2017-01-09 Orange
2017-01-09 Apple
I want to plot Number of Oranges, Number of Apples by Date in a single plot.
How would I do…

ShwetaPri
- 173
- 1
- 4
- 11
4
votes
1 answer
MySQL REGEXP usage within Boolean Match/Against
I have the following MySQL query:
SELECT title, description
FROM some_table
WHERE MATCH (title,description) AGAINST ('+denver (REGEXP "[[:<:]]colorado[s]*[[:>:]]")' IN BOOLEAN MODE);
the "regexp" here looks for a "complete word" colorado (with or…

Sameer
- 401
- 2
- 6
- 10
3
votes
2 answers
negation with match against
I want search those rows that do not contain "rajasthan" in the state field using match against in MySql.
My query is this:
SELECT * from member where MATCH(state) AGAINST('-rajasthan' IN BOOLEAN MODE)
However, it returns an empty set of…

Deepa
- 1,201
- 5
- 15
- 23
3
votes
2 answers
how to get the result of mysql match against in form of percentage?
I am using Match (Col1) Against (Val) in mysql.
select match(body) against(body_var) from articles;
now in case of completely match i am getting result as a number (for example 14.43).
what does this number mean? and the main question is can i…

Alaa
- 4,471
- 11
- 50
- 67
3
votes
1 answer
MySQL Match() Against() Case-Sensitive
Currently, my database is charset Latin1 meaning
SELECT * FROM TABLE MATCH(column1) AGAINST('"words here"' IN BOOLEAN MODE)
will only return in-sensitive searches. The problem though is that my database will be searched with in-sensitive and…

Display_Here
- 311
- 1
- 10
3
votes
1 answer
cakephp match against order by doesn't work
I am trying to order my pagination result. But it doesn't work.
$this->paginate = array(
'limit' => 15,
'fields' => array('*', "MATCH (headline, author, short_headline, subline, teaser, text) AGAINST ('$var') AS…

Paul
- 33
- 4
3
votes
1 answer
Why MATCH() function is not giving results?
I'm using MySQL 5.5.31
I wan to use MATCH() and AGAINST() functions. For it I run following queries in phpMyAdmin:
CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
body TEXT,
…

PHPLover
- 1
- 51
- 158
- 311
3
votes
2 answers
yii FULLTEXT index matching query
I want to creat a sql query in yii framework that look like this:
mysql> SELECT id, body, MATCH (title,body) AGAINST
-> ('Security implications of running MySQL as root') AS score
-> FROM articles WHERE MATCH (title,body) AGAINST
-> ('Security…

Swissa Yaakov
- 186
- 3
- 15
3
votes
2 answers
MySQL match against with a slash
I'm having some problems searching for products that contain a slash (for example ac/dc) with mysql's match against.
There seems to be a certain setting that's affecting this. On my windows' xammp with default settings each of these works…

sleepless_in_seattle
- 2,132
- 4
- 24
- 35
3
votes
2 answers
mysql WHERE MATCH AGAINST
I am having a problem with a mysql and MATCH AGANIST.
I got this row in my database :
1:{Czy jesteśmy tutaj sami};2:{Margit Sanoemo}
I want to find this by following query :
SELECT * FROM data WHERE MATCH (params) AGAINST('*argi*' IN BOOLEAN…

Michał Lach
- 1,291
- 4
- 18
- 37
2
votes
1 answer
Select single found result with MATCH AGAINST
I am trying to get a single result from a table row
I'm using this query
"SELECT * FROM $tableName WHERE MATCH(nombre, mat1, mat2, mat3, mat4, mat5, mat6, mat7)
AGAINST ('$busqueda' IN BOOLEAN MODE)
ORDER BY nombre";
This obviously selects all…

Danny
- 986
- 1
- 18
- 42