Position search
Position search finds all games that contain a specific chess position. This is one of En Croissant’s most powerful features, using memory-mapped binary indexes for instant results.Search types
- Exact position
- Partial position
Matches the exact position including:
- Piece placement on all squares
- Side to move
- Castling rights
- En passant square
How position search works
Position search optimization
En Croissant uses several optimizations for fast position search: Material-based filtering:- Tracks pawns on 2nd and 7th ranks as 16-bit integer
- Enables instant filtering for exact position search
- Reduces search space by 90%+ for endgame positions
- Uses all CPU cores via Rayon parallel iterators
- Processes millions of games in seconds
- Lock-free aggregation of results
Position search on a database with 2 million games typically completes in 2-5 seconds, examining every game’s move sequence.
Move statistics
For each position found, En Croissant displays:Sample games
The search returns up to 10 sample games from the highest-rated players:- Games are ranked by maximum player rating (White or Black)
- Only the top 10 rated games are returned
- Includes full game notation and headers
- Click any game to load it in the analysis board
Game filtering and search
Filter and search games in the database using multiple criteria:Player search
Open the Players tab
In database view, switch to the Players tab to see all players in the database.
Game filters
Combine multiple filters to find specific games:Player filters
- Player 1 (White or Black)
- Player 2 (Opponent)
- Side selection (White/Black/Any)
- ELO rating ranges for each player
Game metadata
- Tournament/Event name
- Date range (from/to)
- Game result (1-0, 0-1, 1/2-1/2)
- Time control
Position-based
- Position search (exact or partial)
- Desired result from position
- Material count filters
- Ply count (game length)
Sorting options
- Date (newest/oldest first)
- Rating (highest/lowest)
- Game length (ply count)
- Game ID
Advanced filtering example
Find all games where:- Magnus Carlsen played with White pieces
- Against opponents rated 2700+
- Reached the Ruy Lopez opening (e4 e5 Nf3 Nc6 Bb5)
- Resulted in a White win
Tournament and event search
Explore games by tournament:Finding tournaments
Search by name
Find specific tournaments using the search box (e.g., “World Championship”, “Tata Steel”).
Tournament statistics
For each tournament, view:- Total games played
- Date range of games
- Players who participated
- Average rating of participants
Search performance
En Croissant’s search system is optimized for speed:Memory-mapped indexing
- Instant “loading” of multi-GB search indexes
- Zero memory overhead (uses OS page cache)
- Shared across multiple searches
Parallel processing
Search result caching
Recent searches are cached in memory:- Cache key:
(GameQuery, database_path) - Prevents redundant searches of the same position
- Automatically cleared when database is modified
- Collision detection prevents concurrent duplicate searches
Search patterns and tips
Opening preparation
- Navigate to your opening position
- Search database for exact position
- Review most popular moves and their win rates
- Load sample games from strong players
- Identify critical variations to study
Endgame study
- Set up the endgame position (e.g., R+P vs R)
- Use partial position search to find all games with that material
- Study how strong players converted or held the position
- Filter by player rating for high-quality examples
Player preparation
- Search for your opponent’s name in Players tab
- Filter their games by color and opening
- Identify their most common lines
- Search specific positions from their games
- Find their weaknesses or unfamiliar variations
Pattern recognition
- Set up a tactical pattern (e.g., knight fork setup)
- Use partial search to find all games with that pattern
- Study the context in which the pattern arose
- Build pattern recognition skills
Combining position search with analysis
Integrate database search into your analysis workflow:Compare with engine
Use engine analysis alongside database statistics to find the objectively best move vs. the most popular move.
Search API
The search system is exposed through Tauri commands:Search progress is updated every 50,000 games processed to avoid UI overhead.