Skip to content
This repository was archived by the owner on Jul 26, 2019. It is now read-only.

asu-ke-web-services/search-api

Repository files navigation

Search API

Build Status Coverage Status

Search API for documents, data, research, people, etc. You can search by subject (keyword), person, location, or time period.

Getting Started

  • Install PHP and Composer
  • Install any project dependencies via composer:
composer install
composer create-project wp-coding-standards/wpcs:dev-master --no-dev -n standards/wpcs
./vendor/bin/phpcs -vvv -w --config-set installed_paths '../../../standards/gios/,../../../standards/wpcs/'

To run the unit and integration tests:

vendor/bin/phpunit

Make sure to add this line to your config.conf: TestSolrApiUrl=http://jilliantessa.me:8983/solr/gios-dev/select This will be the url to the Solr server the test will use.

To run the spec tests:

vendor/bin/phpspec run -c .phpspec.yml

To check the coding standards:

vendor/bin/phpcs --standard=GIOS src test

Developing the Search API

If you add a new class (or rename a class) file in the src folder you will need to run

composer dump-autoload

This will regenerate the class auto-loader which does dependency mapping and creates static load order in the vendor folder.

Configuration

See config.conf.example for example configuration. The following are entries for your config.conf file, located in the project root, that you must fill out for Search API to work properly:

  • SolrApiUrl=http://127.0.0.1:8983/solr/gios/select specifies the SOLR endpoint URL.
  • TestSolrApiUrl=http://jilliantessa.me:8983/solr/gios-dev/select specifies the SOLR endpoint URL used in tests.
  • StanfordNerPath=lib/stanford-ner-2015-04-20/ specifies target path for Stanford's NER library.

The Stanford NER library is required for for the Search API to function. This is available here. Unpack it anywhere you choose, but be sure to include the root path of the Stanford NER library in your configuration file.

About

Search API for documents, data, research, people, etc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors