vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   mysql full text (https://vborg.vbsupport.ru/showthread.php?t=76255)

AN-net 02-13-2005 04:48 PM

mysql full text
 
ok its giving me the error can not find fulltext index in column list. but in phpmyadmin its listed under indexes as fulltext.

here is my code:
PHP Code:

$query['where'] = "MATCH (news.news_title,news.news_text) AGAINST ('".addslashes($searchfor)."') AND news_active=1"

that is my where query

also does it automatically order them by relevancy and how do i change those relevancy values to percentages?

WhSox21 02-16-2005 03:54 AM

Quote:

When MATCH() is used in a WHERE clause, as in the preceding example, the rows returned are automatically sorted with the highest relevance first.
To change it to percentages just add the code to the SELECT list along with the WHERE clause. It also states that this causes no extra overhead as MySQL notices the two MATCH() functions and only does the fulltext search once.

Source:
http://dev.mysql.com/doc/mysql/en/fulltext-search.html

AN-net 02-16-2005 11:57 PM

thanks but why doesn't it perform the search if i have the indexes and i have optimized/repaired the table afterwards...

AN-net 02-18-2005 06:30 PM

anyone??

sabret00the 02-18-2005 07:30 PM

can't you use
PHP Code:

$query['where'] = "WHERE (news.news_title LIKE '%" addslashes($searchfor) . "%' OR news.news_text LIKE '%" addslashes($searchfor) . "%') AND new_active=1; 


AN-net 02-18-2005 07:56 PM

yes but full text is more accurate and retrieves better results;)

sabret00the 02-18-2005 08:13 PM

but it works :P

nah seriously i have no idea then :(

AN-net 02-18-2005 10:03 PM

well i am currently using that for my searching but full text would be so much better>_>


All times are GMT. The time now is 03:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01821 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete