asu-ke-web-services / search-api

Search API for documents, data, research, people, etc
MIT License
2 stars 1 forks source link

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


## 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](http://nlp.stanford.edu/software/CRF-NER.shtml). Unpack it anywhere you choose, but be sure to include the root path of the Stanford NER library in your configuration file.