Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    [mysql] ricerca fulltext senza risultati

    ciao a tutti.. scusate volevo sapere se era normale che una ricerca fulltext non torna risultati se nella tabella vi e' presente solo un record mentre se ci sono + righe e si ripete la stessa identica ricerca tra i risultati compare il record iniziale....


    in pratica se ho tante righe la ricerca

    select *,MATCH (titolo,testo) AGAINST ('windows')
    from articoli
    where MATCH (titolo,testo) AGAINST ('windows')

    mi da risultati se invece ho solo una riga contenente la parola windows invece non da risultati..

    Codice PHP:
    CREATE TABLE `articoli` (
      `
    id_articoloint(10unsigned NOT NULL auto_increment,
      `
    titolovarchar(200) default NULL,
      `
    testotext,
      
    PRIMARY KEY  (`id_articolo`),
      
    FULLTEXT KEY `titolo` (`titolo`,`testo`)
    TYPE=MyISAM AUTO_INCREMENT=;

    -- 
    -- 
    Dump dei dati per la tabella `articoli`
    -- 

    INSERT INTO `articoliVALUES (1'Prova Intervista''Apache\r\n Version 1.3 (and up)\r\n\r\n What is it?\r\n -----------\r\n\r\n Apache is an HTTP server, originally designed for Unix systems. This\r\n is the version of Apache for Microsoft Windows 2000, NT, 98, and 95\r\n systems. Like the Unix version, it includes many frequently\r\n requested new features, and has an API that allows it 
    questo se serve e' la riga interessata (un semplice esempio per testare la funzionalità di ricerca)

  2. #2
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858
    " The search result is empty because the word ``MySQL'' is present in at least 50% of the rows. As such, it is effectively treated as a stopword. For large datasets, this is the most desirable behavior---a natural language query should not return every second row from a 1GB table. For small datasets, it may be less desirable."
    http://dev.mysql.com/doc/mysql/en/fulltext-search.html



    think simple think ringo

  3. #3
    emh quindi non c'e' altro modo? devo abbandonare idea di utilizzare il match against e usare il "comune" like?

  4. #4
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858
    "#

    The 50% threshold for natural language searches is determined by the particular weighting scheme chosen. To disable it, look for the following line in myisam/ftdefs.h:

    #define GWS_IN_USE GWS_PROB

    Change the line to this:

    #define GWS_IN_USE GWS_FREQ

    Then recompile MySQL. There is no need to rebuild the indexes in this case. Note: By doing this you severely decrease MySQL's ability to provide adequate relevance values for the MATCH() function. If you really need to search for such common words, it would be better to search using IN BOOLEAN MODE instead, which does not observe the 50% threshold."
    http://dev.mysql.com/doc/mysql/en/fu...ne-tuning.html



    think simple think ringo

  5. #5
    [supersaibal]Originariamente inviato da marketto
    "#

    The 50% threshold for natural language searches is determined by the particular weighting scheme chosen. To disable it, look for the following line in myisam/ftdefs.h:

    #define GWS_IN_USE GWS_PROB

    Change the line to this:

    #define GWS_IN_USE GWS_FREQ

    Then recompile MySQL. There is no need to rebuild the indexes in this case. Note: By doing this you severely decrease MySQL's ability to provide adequate relevance values for the MATCH() function. If you really need to search for such common words, it would be better to search using IN BOOLEAN MODE instead, which does not observe the 50% threshold."
    http://dev.mysql.com/doc/mysql/en/fu...ne-tuning.html



    [/supersaibal]
    emh si pero' posso dire a chi mi da l'host di ricompilare mysql x me? eheheh

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.