Code Monkey home page Code Monkey logo

monki-map-search-parser's Introduction

Monki Map Search Parser

Tests Lint

This repository defines the grammar and the parser for searching places in the Monki Map app.

Search grammar

Search based on a place's name or summary

Qualifier Example
(anything that does not match other qualifiers) La Dame du Lac includes places which contain "la", "dame", "du" and "lac" in their name or summary.
"…" "La Dame du Lac" includes places which contain "la dame du lac" in their name or summary. This keeps the order of words.

These qualifiers are case-insensitive (i.e. "A" = "a"), and diacritics-sensitive (i.e. "à" ≠ "a"). One day we will make it diacritics-insensitive too, to make searching for places easier.

Search based on whether a place is a draft

Qualifier Example
draft:false Do not include draft places in results
draft:true Includes draft places
draft:only Includes only draft places

When not provided, default value should be customizable in the app settings.

Search based on the place kind

Qualifier Example
kind:KIND_ID kind:indoor_parkour_park includes only indoor parkour parks

Search based on the place category

Qualifier Example
category:CATEGORY_ID Includes places of category CATEGORY_ID

Search based on the place creator

Qualifier Example
creator:USER_ID Includes places created by USER_ID
creator:@USER_NAME Includes places created by @USER_NAME

Images

Qualifier Example
images:n images:1 includes places with exactly 1 image
images:<RANGE> images:>5 includes places with more than 5 images
images:>=10 includes places with 10 or more images
images:<5 includes places with less than 5 images
images:<=3 includes places with 3 or less images
images:1..10 includes places with 1 to 10 images

<RANGE> is a number range (>n, >=n, <n, <=, x..y).

Creation date

Qualifier Example
created:TIMESTAMP created:>2021-10-13 includes places created after October 13th, 2021
created:>=2021-01-01 includes places created on or after January 1st, 2021
created:<2021-10-13 includes place created before October 13th, 2021
created:<=2020-12-31 includes places created before 2021

TIMESTAMP can be a date or a date with time, as defined by ISO 8601.

Place properties

Qualifier Example
properties:PROPERTY_KIND/PROPERTY_ID:true properties:feature/big_wall:true includes places with a big wall
properties:PROPERTY_KIND/PROPERTY_ID:false properties:hazard/high_drop:false includes places without high drops
properties:PROPERTY_KIND:n properties:benefit:5 includes places with 5 benefits, no matter which
properties:PROPERTY_KIND:<RANGE> properties:benefit:>5 includes places with more than 5 benefits, no matter which

<RANGE> is a number range (>n, >=n, <n, <=, x..y).

monki-map-search-parser's People

Contributors

remibardon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.