Overview
Pokémon Explorer features a powerful smart search system that allows you to find Pokémon using multiple search criteria. The search engine supports both Spanish and English keywords and can search by name, type, color, habitat, size, and weight.Search Capabilities
Name Search
Search for Pokémon by their exact or partial name
Type Search
Find Pokémon by type using Spanish or English keywords
Color Search
Filter Pokémon by their primary color
Habitat Search
Search by natural habitat (cave, forest, sea, etc.)
Size Search
Find Pokémon by size category (tiny, small, medium, large, huge)
Weight Search
Filter by weight category (light, heavy, massive)
How It Works
Search Input Handler
The search system uses a debounced input handler to optimize performance:logica.js
The search includes a 300ms debounce to prevent excessive API calls while typing.
Smart Search Parsing
TheparseSmartSearch() method analyzes your query and identifies search criteria:
logica.js
Search Suggestions
As you type, the search provides real-time suggestions:logica.js
Search Types
Name Search
Searches the cached Pokémon data first, then queries the API if needed:logica.js
Multi-Criteria Search
Combines multiple search criteria for precise results:logica.js
Supported Keywords
The search system supports both Spanish and English keywords:Type Keywords
Type Keywords
- Spanish: fuego, agua, planta, eléctrico, hielo, lucha, veneno, tierra, volador, psíquico, bicho, roca, fantasma, dragón, siniestro, acero, hada
- English: fire, water, grass, electric, ice, fighting, poison, ground, flying, psychic, bug, rock, ghost, dragon, dark, steel, fairy
Color Keywords
Color Keywords
- Spanish: negro, azul, marrón, gris, verde, rosa, morado, rojo, blanco, amarillo
- English: black, blue, brown, gray, green, pink, purple, red, white, yellow
Habitat Keywords
Habitat Keywords
- Spanish: cueva, bosque, pradera, montaña, raro, mar, urbano, orilla
- English: cave, forest, grassland, mountain, rare, sea, urban, waters-edge
Size Keywords
Size Keywords
- Spanish: muy pequeño, pequeño, mediano, grande, enorme, gigante
- English: tiny, small, medium, large, huge
Weight Keywords
Weight Keywords
- Spanish: ligero, pesado, masivo
- English: light, heavy, massive
Example Searches
By Name
pikachu or char (partial matches work)By Type
fuego or fire (finds all Fire-type Pokémon)By Color
azul or blue (finds blue Pokémon)Combined Search
planta verde (finds green Grass-type Pokémon)You can combine multiple criteria in a single search query. For example: “grande rojo” will find large, red Pokémon.
Performance Optimizations
- Debouncing: 300ms delay prevents excessive API calls
- Caching: Uses
Mapdata structures for O(1) lookups - Lazy Loading: Only fetches Pokémon data when needed
- Batch Processing: Loads multiple Pokémon in parallel batches of 50