Difference between revisions of "Search Management"

From Gcube Wiki
Jump to: navigation, search
(Search Manager)
(Example Code)
Line 1: Line 1:
 
== Search Management==
 
== Search Management==
 
=== Example Code ===
 
=== Example Code ===
 +
[[media:SearchManagmentClients.tar.gz‎|Search Management Services Usage Examples]]
 
==== Search Master ====
 
==== Search Master ====
 
===== Introduction =====
 
===== Introduction =====

Revision as of 12:08, 23 August 2007

Search Management

Example Code

Search Management Services Usage Examples

Search Master

Introduction

The SearchMasterService is the main entry point to the functionality of the search engine. It contains the elements that will organize the execution of the search operators for the various tasks the Search engine is responsible for.

The SearchMasterService is responsible for the first stage of query processing. This stage produces a query execution plan, which in the DILIGENT implementation is a directed acyclic graph of SearchOperator invocations. This element is responsible for gathering the whole set of information that is expected to be needed by the various search services and provides it as context to the processed query. In this manner, delays for gathering info at the various services are significantly reduced and assist responsiveness.

The information gathered is produced by various components or services of the DILIGENT Infrastructure. They include the Diligent Information Service (DIS), Content and Metadata Management, Indexing service etc. The process of gathering all needed information proves to be very time consuming. To this end, the SearchMasterService keeps a cache of previously discovered information and state.

The SearchMaster validates the received Query using Search Library elements. It validates the user supplied query against the elements of the specific Digital Library Instance. This ensures that content collections are available, metadata elements (e.g. fields) are present, operators (i.e. services) are accessible etc.

DL Description

Through the Search Master, external services can receive a structured overview of the Digital Library resources available and usable during a search operation. An example of this summarization is shown bellow:

  <SearchConfig>
    <collections>
      <collection name="Example Collection Name 1" id="1fc1fbf0-fa3c-11db-82de-905c553f17c3">
        <TYPE>DATA</TYPE>
        <ASSOCIATEDWITH>d510a060-fa3c-11db-aa91-f715cb72c9ff</ASSOCIATEDWITH>
        <ASSOCIATEDWITH>g45612f7-dth5-23fg-45df-45dfg5b1r34s</ASSOCIATEDWITH>
      </collection>
      <collection name="Example Collection Name 2" id="c3f685b0-fdb6-11db-a573-e4518f2111ab">
        <TYPE>DATA</TYPE>
        <ASSOCIATEDWITH>7bb87410-fdb7-11db-8476-f715cb72c9ff</ASSOCIATEDWITH>
        <INDEX>FEATURE</INDEX>
      </collection>
      <collection name="Example Collection Name 3" id="d510a060-fa3c-11db-aa91-f715cb72c9ff">
        <TYPE>METADATA</TYPE>
        <LANGUAGE>en</LANGUAGE>
        <SCHEMA>dc</SCHEMA>
        <ASSOCIATEDWITH>1fc1fbf0-fa3c-11db-82de-905c553f17c3</ASSOCIATEDWITH>
        <INDEX>FTS</INDEX>
        <INDEX>XML</INDEX>
      </collection>
      <collection name="Example Collection Name 4" id="g45612f7-dth5-23fg-45df-45dfg5b1r34s">
        <TYPE>METADATA</TYPE>
        <LANGUAGE>en</LANGUAGE>
        <SCHEMA>tei</SCHEMA>
        <ASSOCIATEDWITH>1fc1fbf0-fa3c-11db-82de-905c553f17c3</ASSOCIATEDWITH>
        <INDEX>FTS</INDEX>
        <INDEX>XML</INDEX>
      </collection>
      <collection name="Example Collection Name 5" id="7bb87410-fdb7-11db-8476-f715cb72c9ff">
        <TYPE>METADATA</TYPE>
        <LANGUAGE>en</LANGUAGE>
        <SCHEMA>dc</SCHEMA>
        <ASSOCIATEDWITH>c3f685b0-fdb6-11db-a573-e4518f2111ab</ASSOCIATEDWITH>
        <INDEX>FTS</INDEX>
        <INDEX>XML</INDEX>
      </collection>
    </collections>
  </SearchConfig>
Query Language

(under construction)

Search Manager

Introduction

An alternative entry point to the Search functionality is the SearchManager Service. This service provides an abstraction over the SearchMasterService enabling non-blocking query submission and result retrieval. Through this service the client is capable of submitting a query, checking the execution progress of a specific query and finally retrieving the endpoint reference of the results.

Upon submission of a query, the SearchManager Service creates a resource that is the placeholder of the query’s status. The end point reference (EPR) of this resource is returned to the client, so as to be able to retrieve, at a future time, the relevant information regarding the progress of the query. Internally the SearchManager Service has to:

  • Communicate with a SearchMaster Service and wait for the search operation to terminate.
  • Return the EPR of a status resource that actually shows that the query is queued.

To this end, this service spawns a new thread that hides the blocking functionality of the SearchMaster Service. The above mentioned resource contains the status of the search request and the endpoint reference of the final results, if available. This resource is retrieved each time a client asks for the status of his request, through its corresponding EPR.