1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-01-02 03:37:54 +02:00

renaming "from" and "to" to "after" and "before" in search query #309

This commit is contained in:
Patrik J. Braun 2021-05-23 17:58:58 +02:00
parent d0153e58d9
commit f84f555182
3 changed files with 29 additions and 23 deletions

View File

@ -138,26 +138,28 @@ export class BenchmarkRunner {
await this.setupDB();
const queryKeywords: QueryKeywords = {
NSomeOf: '-of',
NSomeOf: 'of',
and: 'and',
caption: 'caption',
directory: 'directory',
file_name: 'file-name',
from: 'from',
keyword: 'keyword',
or: 'or',
from: 'after',
to: 'before',
landscape: 'landscape',
maxRating: 'max-rating',
maxResolution: 'max-resolution',
minRating: 'min-rating',
minResolution: 'min-resolution',
or: 'or',
orientation: 'orientation',
any_text: 'any-text',
keyword: 'keyword',
caption: 'caption',
directory: 'directory',
file_name: 'file-name',
person: 'person',
portrait: 'portrait',
position: 'position',
someOf: 'some-of',
to: 'to',
kmFrom: 'km-from'
};
const queryParser = new SearchQueryParser(queryKeywords);

View File

@ -8,24 +8,26 @@ export class SearchQueryParserService {
public readonly keywords: QueryKeywords = {
NSomeOf: 'of',
and: 'and',
caption: 'caption',
directory: 'directory',
file_name: 'file-name',
from: 'from',
keyword: 'keyword',
or: 'or',
from: 'after',
to: 'before',
landscape: 'landscape',
maxRating: 'max-rating',
maxResolution: 'max-resolution',
minRating: 'min-rating',
minResolution: 'min-resolution',
or: 'or',
orientation: 'orientation',
any_text: 'any-text',
keyword: 'keyword',
caption: 'caption',
directory: 'directory',
file_name: 'file-name',
person: 'person',
portrait: 'portrait',
position: 'position',
someOf: 'some-of',
to: 'to',
kmFrom: 'km-from'
};
private readonly parser: SearchQueryParser;

View File

@ -20,26 +20,28 @@ import {
import {QueryKeywords, SearchQueryParser} from '../../../src/common/SearchQueryParser';
const queryKeywords: QueryKeywords = {
NSomeOf: '-of',
NSomeOf: 'of',
and: 'and',
caption: 'caption',
directory: 'directory',
file_name: 'file-name',
from: 'from',
keyword: 'keyword',
or: 'or',
from: 'after',
to: 'before',
landscape: 'landscape',
maxRating: 'max-rating',
maxResolution: 'max-resolution',
minRating: 'min-rating',
minResolution: 'min-resolution',
or: 'or',
orientation: 'orientation',
any_text: 'any-text',
keyword: 'keyword',
caption: 'caption',
directory: 'directory',
file_name: 'file-name',
person: 'person',
portrait: 'portrait',
position: 'position',
someOf: 'some-of',
to: 'to',
kmFrom: 'km-from'
};