The eagle-i search application is packaged and deployed in two configurations: institution and central. The institution search application deployment supports the search of resource data in a single institution's eagle-i repository. The central search application deployment supports the search of data in a set of eagle-i institution repositories.
In the eagle-i source tree, the webapps/institution
project is used to build the single institution search app. The webapps/central
project is used to build the multi-institution search application.
The institution and central webapp projects contain very little code consisting of two java-based configuration files that determine in which mode the client and server search implementation will be executing.
InstitutionApp.java
and CentralApp.java
are the Google Web Toolkit (GWT) EntryPoint
implementations that determine in which mode the GWT-based browser UI will execute. They instantiate a SearchApplicationContext
with the parameter true or false that tells the UI whether it should display single or multi-institution search components. For example, in single institution mode, the Institution filter will not be displayed in the Location section of the sidebar, and the institution name is not displayed in the search result summary.
InstitutionSearchConfig.java
and CentralSearchConfig.java
are Spring configuration files that determine the back-end Spring beans that will be loaded for the two search app modes. In particular, it defines the rootSearchProvider
singleton bean which is the core handler for search requests from the client.
The bulk of the search application implementation lives in the library project dependencies of institution and central WAR projects.
Key components of the back-end and client implementation are described below:
Notes:
org.eaglei.ui.gwt.search.server.
SearchServlet
SearchServlet
handles the core set of search operations requested by the the client. In the SearchServlet init()
method, references to its singleton dependencies are obtained, and harvesting of eagle-i repository data is initiated.
=> ConnectionManager
=> InstitutionRegistry
=> PollingDataHarvester
=>SearchProvider
SearchRequests
SearchResultSet
, SearchResult
ClassCountResult
ClassCountResult
MultiDataSetSearchProvider
, described below=>*EIOntModel
SearchProvider
compute; part of SearchResult
)=> AsynchronousLoggerSearch, AsynchronousLoggerCount
org.eaglei.services.
InstitutionRegistry
RepositoryHttpConfig
for each institution (migrate from legacy URIs.)/common/services/src/main/resources/services-config.xml
is the primary configuration file for InstitutionRegistry
. It is packaged in JAR (Should be loaded from classpath location). It has a dependency on finding an institution-registry.properties file in the classpath which contain properties
org.eaglei.tier
org.eaglei.subdomain
org.eaglei.repository.username
org.eaglei.repository.password
(TODO: central: can't assume same for every institution)org.eaglei.ui.gwt.suggest.server.
DataSuggestServlet
DataSuggestServlet
is the server-side provider of the list of suggestions displayed as the user types in a search string. Note that client-server communication for this servlet is JSON-based rather than GWT RPC.
=>DataHarvester
=> SuggestionProvider
List<EntityMatch>
org.eaglei.search.harvest.
PollingDataHarvester
extends DataHarvester
addChangeListener(ResourceChangeListener)
(EIEntity institution)
onChangeEvent(ResourceChangeEvent event)
onChangeStreamEnd(EIEntity institution, Date lastModifiedDate)
optimize()
harvest()
hasInitalData()
; (move to SearchProvider?)startPolling()
org.eaglei.search.harvest.
RepositoryStreamHarvester
implements PollingDataHarvester
=>InstitutionRegistry
RepositoryHttpConfig
for a given institution, to call harvest=> EIOntModel
EIEntity
from URIs (label)ResourceChangeListeners
ResourceChangeEvent
EIClass
startPolling()
, creates a thread that calls harvest()
ResourceChangeListener
takes too long?)org.eaglei.search.harvest.
MultiDataSourceStreamHarvester
implements PollingDataHarvester
=> EIOntModel
=> Analyzer
=> Directory
=> ClassUsageCache
=> ProviderUsageCache
=> SearchExcludeConfiguration
/common/runtime/solr/src/main/resources/search-config.xml
org.eaglei.solr.suggest.
SolrDataSuggestIndexer
implements ResourceChangeListener
DataHarvester
as a ResourceChangeListener
=> EIOntModel
=> Analyzer
=> Directory
org.eaglei.search.provider.
MultiDataSetSearchProvider
implements SearchProvider
org.eaglei.solr.search.
SolrSearchProvider
implements SearchProvider
SolrSearchProvider is class that executes a search query on the eagle-i data stored in a Solr indices.The data available to be searched may be single- or multi-institution based on application configuration. The SolrSearchProvider ensures that UI dependencies such as the match highlighting snippit are set in the search response.
=> InstitutionRegistry
=> SolrServer
=> ClassUsageCache
=> ProviderUsageCache
=> SolrDataSuggestProvider
=> SolrSearchQueryBuilder
SearchRequest
The eagle-i system supports three Apache.Solr index configurations: ModelSuggest-core
, Search-core
, and DataSuggest-core
.
An instance of a SolrServer
utilized by eagle-i web application (e.g. Search, SWEET, Ontology Browser) will contain one or more of these three indices. Currently, each web application instantiates its own embedded SolrServer
with the cores that the particular web app need.It is anticipated that in the future, web applications will utilize a shared SolrServer
.
ModelSuggest-core
is an index of all terms in the eagle-i ontology. This core is used to provide autosuggest of ontology class labels and class synonyms. The suggestion list returned can be filtered by type (class uri): for example, only return suggestions of type Instrument. Clients of ModelSuggest-core
include the SWEET form fields, and the Ontology Browser (Glossary) searchbox.ModelSuggest-core
, DataSuggest-core
will only include ontology terms *currently used in the dataset*. For example, if the ontology term "Lepidosauria" is not currently used by any resource in the eagle-i dataset, it will not be offered in autosuggest.Another feature of the DataSuggest-core
is that it keeps track of the resource categories in which any given term (resource label or class label) is used. This supports the "in Instruments" and "in Reagents" feature of the search autosuggest.
org.eaglei.solr.
EagleISolrConfig
This class is provides api for reading in solr configuration files, and determining the location that solr data files will be written.
By default, the configuration files for these solr cores are read from the solrhome directory in the eagle-i-common-solr.ja
.
The location of data files created for the these core indices is the concatenation of the system property org.eaglei.home
, a string passed to the constructor of EagleISolrConfig
(normally the application name
-- search, sweet, glossary), plus the name of the core.