Scid
4.7.0
|
#include "common.h"
#include "misc.h"
#include "scidbase.h"
#include <algorithm>
#include <string>
#include <vector>
Go to the source code of this file.
Functions | |
errorT | search_index (const scidBaseT *base, HFilter &filter, int argc, const char **argv, const Progress &progress) |
search_index() - search for games using game's IndexEntry info More... | |
errorT search_index | ( | const scidBaseT * | base, |
HFilter & | filter, | ||
int | argc, | ||
const char ** | argv, | ||
const Progress & | progress | ||
) |
search_index() - search for games using game's IndexEntry info
base | the scidBaseT to search |
filter | the filter to be modified with the result of the search (RESET, AND, OR operations can be applied to the filter) |
argc | number of argv elements |
argv | an array of string pairs <criteria,value> |
progress | report search progress to UI |
This function perform a fast games search using the IndexEntry info. Criteria should start with the char '-' and can include the optional trailing chars '!': meaning that we want the games that do not match the <criteria,value> pair '|': that allows to search for games that match at least one <criteria,value> in a group of <criteria,value> pairs
Names searches (-player, -white, -black, -event, -site -round) have special rules:
Examples: -player "Carlsen, Magnus" means search for games played by (either as white or black) Carlsen (surname) Magnus (name)
-player carlsen -black kramnik means (white name contains 'carlsen' || black name contains 'carlsen') && (black name contains 'kramnik')
-white carlsen -black anand -black| kramnik -black| aronian means (white == carlsen) && (black == anand || black == kramnik || black == aronian) and will find the games played by carlsen as white against anand, or kramnik, or aronian
-elo "2700 4000" -event! blitz means elo > 2700 && elo < 4000 && event != blitz and will find the games played by players with elo greater or equal than 2700, excluding the blitz events
-welo "2700 4000" -belo|! "0 2700" -delo "-200 200" means (white elo > 2700 && white elo < 4000) || (belo is not in the range 0-2700) && ((welo - belo) > -200 && (welo - belo) < 200)
Definition at line 501 of file searchindex.cpp.