/example-search

An example project that uses php to search over json data

Primary LanguagePHP

example-search

An example project that uses php to search over json data

Installation

Composer 2.4.1

Download and install Composer by following the official instructions.

For usage, see the documentation.

Requirements

PHP 7.2.5 or above for the latest version.

Download and install PHP by following the official instructions.

Quick Start

  • run composer install

  • start PHP local server: php -S localhost:8000

Usage

send GET requests to local server:

http://localhost:8000/search.php?service=mass&position[lat]=59.31411099999999&position[lng]=18.05118499999962

Capture

Improve performance

  • create model class for service
  • use generators to parse services
  • filtering, calculate distance, scorring in same iteration
  • cache filter results
  • sort, limit, paginate results