goto-bus-stop / recgames

[WIP] Age of Empires 2 Recorded Games. Watch out, the current live version will be wiped multiple times before an actual release :)
https://recgam.es
GNU General Public License v3.0
1 stars 0 forks source link

Gui search query builder #23

Open goto-bus-stop opened 7 years ago

goto-bus-stop commented 7 years ago

Where users can select players, maps etc they want to search for.

goto-bus-stop commented 7 years ago

Will base this on ElasticSearch/Lucene queries. Should extract players/maps/etc from the query string entered in the search box.

Grammar: https://github.com/apache/lucene-solr/blob/master/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj

So should implement a query string parser in PHP. And probably extend it with a few shortcuts for searching for players, which will be compiled to Lucene queries.

An example something the query parser could do is detect player/civ pairs and turn them into strict Lucene terms:

TheViper (Huns)(name:TheViper AND civilization:17)