Ver Mensaje Individual
  #4 (permalink)  
Antiguo 21/08/2008, 07:28
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 9 meses
Puntos: 416
Respuesta: optimizar buscador

Hmmmm ... para optimizar tu busqueda te recomiendo la extension php_stem.dll
Eso podria optimizar tu busqueda.

Esa extension te ayuda a eliminar los sufijos mas usuales en las palabras.
Para usarlo es de esta manera: stem($string, STEM_LANGUAGE); (En nuestro caso, SPANISH).

Si sabes ingles te dejo esto:

Cita:
0. What is it?

Basically, a word stemmer takes a word and strips it of its suffix.
(Or suffixes.) Words like "assassination", "assassinations",
"assassinate" and "assassinated" all have the same base -- "assassin".
A word stemmer breaks each of the aforementioned words down to their
common base.
Cita:
1. What is it good for?

The idea behind stemming is to increase the efficiency of information
retrieval by combining similar words. This has a couple of advantages
in, say, a typical search engine:

* You can reduce the size of your database/keyword list. There's no
reason to store "physics", "physicist" and "physical" when you
can just store "physic" and provide more or less the same results.
This can decrease the search time as well as decrease the physical
size of the database.

* Provide more generalized results. If a user searches on "assassins",
it's easy to provide them results with words like "assassinated",
"assassinations" and "assassin", since they all work out to the same
thing after stemming.

Ejemplo:
print "Spanish: chicharrones -> " . stem("chicharrones", STEM_SPANISH) . "\n";
Imprimiria:
Spanish: chicharrones -> chicharron

Otra cosa que puedes hacer para optimizar tu search engine es meter todas las palabras comunes en un array y eliminarlas de la cadena cuando hagan una busqueda (parecido a lo que hace google).