SQL baze podataka - Sponzor: Baze-Podataka.net MySQL, MSSQL, Oracle, Access, ODBC. Ako imate problem brže i preciznije ćete dobiti odgovor ako priložite strukturu tabela ili skript koji kreira tabele i puni ih test podacima umesto što to problem opisujete samo rečima. Sponzor: Baze-Podataka.net - Blog o bazama podataka |
|
Alati teme | Način prikaza |
15. 11. 2007. | #1 | |
Ivan Dilber
Sir Write-a-Lot
|
full-text search se chudno ponasa
mysql mi jako chudno sortira rezultate full-text searcha, kao sto se moze videti iz prilozenog:
Kôd:
SELECT a3a.ID, a3a.Title, MATCH (a3a.Title) AGAINST ('florida car insurance') AS relevance FROM articles3 AS a3a WHERE MATCH (a3a.Title) AGAINST ('florida car insurance') LIMIT 10 +--------+----------------------------------------+-----------------+ | ID | Title | relevance | +--------+----------------------------------------+-----------------+ | 193584 | Florida Health Insurance | 10.545636177063 | | 281813 | Florida Insurance Lawyers | 10.545636177063 | | 214760 | Florida Health Insurance | 10.545636177063 | | 210643 | Florida Car Insurance Requirements | 10.545636177063 | | 214756 | Florida Medical Insurance | 10.545636177063 | | 193583 | Florida Health Insurance Quote | 10.42969417572 | Takodje postoji i nesto cudno oko boolean searcha, jer: Kôd:
mysql> SELECT a3a.ID, a3a.Title -> FROM articles3 AS a3a -> WHERE -> MATCH (a3a.Title) AGAINST ('+florida +car +insurance' IN BOOLEAN MODE) -> LIMIT 10; +--------+------------------------------------------------------------------------+ | ID | Title | +--------+------------------------------------------------------------------------+ | 193582 | Florida Group Health Insurance | | 193583 | Florida Health Insurance Quote | | 193584 | Florida Health Insurance | | 193585 | Florida Individual Health Insurance | | 193586 | Florida Small Business Health Insurance | | 193587 | Florida State Health Insurance | | 193632 | Affordable Florida Health Insurance | | 193716 | An Overview of Health Insurance Coverage for Individuals in Florida | | 193828 | Regulations Concerning Long Term Care Insurance in Florida | | 194058 | Florida Flood Insurance: How Residents Can Obtain and Benefit from It | +--------+------------------------------------------------------------------------+ 10 rows in set (0.04 sec) Citat:
jel zna neko slucajno isplati li se da upgradujem mysql na 5-cu, da li tamo full-text search radi bolje?
__________________
Leadership is the art of getting people to want to do what you know must be done. Poslednja izmena od ivanhoe : 15. 11. 2007. u 18:50. |
|
15. 11. 2007. | #2 |
old school
Professional
|
Mislim da to nije bug, nego feature.
Naime, full-text search "ignorise" sve rijeci, koje su manje ili jednake od vrijednosti definisane u parametru ft_min_word_len, koji je po defaultu 3. Posto ti ovdje imas rijec "car", a to je 3 znaka, onda ti full-text pretraga jednostavno ignorise tu rijec i pretrazuje samo po rijecima "florida" i "insurance". Takodje, provjeri da ti rijec "car" nije u "stop keywords" listi. Probaj sa nekom duzom rijeci, pa se uvjeri da li je to to.
__________________
Blog: Baze podataka ------------------------ Oracle OCP DBA Oracle OCE SQL Expert Oracle OCP Developer Certified MySQL DBA |
15. 11. 2007. | #3 | |
Super Moderator
Invented the damn thing
Datum učlanjenja: 06.06.2005
Poruke: 2.371
Hvala: 370
701 "Hvala" u 194 poruka
|
Citat:
Dakle, slazem se sa Dejanom, bice da je u pitanju feature a ne bug |
|
16. 11. 2007. | #4 |
Ivan Dilber
Sir Write-a-Lot
|
vidis na to sam potpuno zaboravio, a sto je najgore znam za to ogranicenje, ali nisam uopste povezao da 'car' ima samo 3 slova..
/me stupid... thanx ppl..
__________________
Leadership is the art of getting people to want to do what you know must be done. |
|
|
Slične teme | ||||
Tema | Početna poruka teme | Forum | Odgovori | Poslednja poruka |
relevantnost mysql full text searcha | ivanhoe | SQL baze podataka - Sponzor: Baze-Podataka.net | 13 | 29. 04. 2010. 12:14 |
Boolean full-text search | ivanhoe | SQL baze podataka - Sponzor: Baze-Podataka.net | 4 | 03. 06. 2009. 02:35 |
Klikom na polje za pretragu da nestane text "search site" | Deki80 | Sva početnička pitanja | 4 | 08. 07. 2008. 16:33 |
Sphinx Free open-source SQL full-text search engine - problem sa našim slovima | pcigre | SQL baze podataka - Sponzor: Baze-Podataka.net | 9 | 01. 04. 2008. 10:29 |
mysql full text search u boolean modu | ivanhoe | SQL baze podataka - Sponzor: Baze-Podataka.net | 1 | 11. 05. 2007. 22:59 |