org.compass.needle.gigaspaces.service
Class ServerCompassSearchService

java.lang.Object
  extended by org.compass.needle.gigaspaces.service.ServerCompassSearchService
All Implemented Interfaces:
CompassSearchService

public class ServerCompassSearchService
extends Object
implements CompassSearchService

This is the server side implemenation of the search service that should be exposed using OpenSpaces service exporter using sync remoting (as a filter to the Space).

Initialized with a Compass instance to perform the search with, and a GigaSpace instnace to load data objects from the space. Note, since objects are loaded from the space, compass.osem.supportUnmarshall in Compass should be set to false.

Author:
kimchy

Constructor Summary
ServerCompassSearchService()
           
 
Method Summary
 SearchResults search(String query)
          Search and returns all the matching objects for the given query.
 SearchResults search(String query, int maxResults)
          Search and returns maxResults the matching objects for the given query.
 SearchResults search(String query, int maxResults, float fromScore)
          Search and returns up to maxResults the matching objects for the given query.
 SearchResourceResults searchResource(String query)
          Search and returns all the matching resources for the given query.
 SearchResourceResults searchResource(String query, int maxResults)
          Search and returns up to maxResults the matching resources for the given query.
 SearchResourceResults searchResource(String query, int maxResults, float fromScore)
          Search and returns up to maxResults the matching resources for the given query.
 void setCompass(Compass compass)
           
 void setGigaSpace(org.openspaces.core.GigaSpace gigaSpace)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerCompassSearchService

public ServerCompassSearchService()
Method Detail

setCompass

public void setCompass(Compass compass)

setGigaSpace

public void setGigaSpace(org.openspaces.core.GigaSpace gigaSpace)

searchResource

public SearchResourceResults searchResource(String query)
Description copied from interface: CompassSearchService
Search and returns all the matching resources for the given query.

Specified by:
searchResource in interface CompassSearchService

searchResource

public SearchResourceResults searchResource(String query,
                                            int maxResults)
Description copied from interface: CompassSearchService
Search and returns up to maxResults the matching resources for the given query.

Specified by:
searchResource in interface CompassSearchService

searchResource

public SearchResourceResults searchResource(String query,
                                            int maxResults,
                                            float fromScore)
Description copied from interface: CompassSearchService
Search and returns up to maxResults the matching resources for the given query. Hits that are higher than the provided fromScore are filtered out. This allows for simpler pagination.

Specified by:
searchResource in interface CompassSearchService

search

public SearchResults search(String query)
Description copied from interface: CompassSearchService
Search and returns all the matching objects for the given query.

Specified by:
search in interface CompassSearchService

search

public SearchResults search(String query,
                            int maxResults)
Description copied from interface: CompassSearchService
Search and returns maxResults the matching objects for the given query.

Specified by:
search in interface CompassSearchService

search

public SearchResults search(String query,
                            int maxResults,
                            float fromScore)
Description copied from interface: CompassSearchService
Search and returns up to maxResults the matching objects for the given query. Hits that are higher than the provided fromScore are filtered out. This allows for simpler pagination.

Specified by:
search in interface CompassSearchService


Copyright (c) 2004-2008 The Compass Project.