Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.gouv.culture.sdx.search.lucene.query
Interface Query

All Superinterfaces:
  org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, Describable, Encodable, Identifiable, Localizable, org.apache.avalon.framework.logger.LogEnabled, Query, SdxObject, org.apache.avalon.framework.service.Serviceable, org.apache.excalibur.xml.sax.XMLizable

All Known Implementing Classes:
  AbstractQuery

public interface Query
extends Query

Interface pour toutes les classes qui representent des requetes de recherche.

Nested Class Summary

Nested classes inherited from class fr.gouv.culture.sdx.utils.SdxObject
`SdxObject.ConfigurationNode`

Field Summary
`static int` | `defaultOperator` The default operator, currently set to OPERATOR_AND
`static int` | `LUCENE_BOOLEAN_QUERY_MAX_CLAUSES`
`static int` | `OPERATOR_AND` The "AND" operator
`static int` | `OPERATOR_NOT` The "NOT" operator
`static int` | `OPERATOR_OR` The "OR" operator
`static java.lang.String` | `SEARCH_ENGINE` The search engine specification

Fields inherited from interface fr.gouv.culture.sdx.search.Query
`CLASS_NAME_SUFFIX`

Fields inherited from interface fr.gouv.culture.sdx.utils.Encodable
`DEFAULT_ENCODING`

Method Summary
`void` | `addBaseQuery(Query query, int operator)` Adds a base query to the current query
`void` | `addBaseQuery(Results baseResults, int operator)` Adds a base query to the current query.
`void` | `addFilter(Filter f)` Adds a filter for this query.
`void` | `addSortSpecification(SortSpecification ss)` Adds a sort specification for this query.
`Results` | `execute()` Executes a query and returns results.
`float` | `getBoost()` Returns the boost on the query.
`org.apache.lucene.search.Query` | `getCachedQuery()`
`org.apache.lucene.search.Query` | `getLuceneQuery()` Returns the internal Lucene representation of the query.
`SearchLocations` | `getSearchLocations()`
`Filter` | `prepare()` Prepares a query for proper execution.
`void` | `setBoost(float boost)` Change the boost on the query.
`void` | `setBoost(java.lang.String boost)` Change the boost on the query.
`void` | `setLuceneQuery(org.apache.lucene.search.Query query)`
`void` | `setUp(SearchLocations sLocs, org.apache.lucene.search.Query query)`

Methods inherited from interface fr.gouv.culture.sdx.utils.SdxObject
`getLog`

Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled
`enableLogging`

Methods inherited from interface org.apache.avalon.framework.context.Contextualizable
`contextualize`

Methods inherited from interface org.apache.avalon.framework.service.Serviceable
`service`

Methods inherited from interface org.apache.avalon.framework.configuration.Configurable
`configure`

Methods inherited from interface fr.gouv.culture.sdx.utils.Identifiable
`getId, setId`

Methods inherited from interface fr.gouv.culture.sdx.utils.Describable
`getDescription, setDescription`

Methods inherited from interface fr.gouv.culture.sdx.utils.Encodable
`getEncoding, setEncoding`

Methods inherited from interface fr.gouv.culture.sdx.utils.Localizable
`getLocale, getXmlLang, setLocale, setXmlLang`

Methods inherited from interface org.apache.excalibur.xml.sax.XMLizable
`toSAX`

Field Detail

### OPERATOR_AND

    public static final int OPERATOR_AND

  The "AND" operator

  See Also:
    Constant Field Values

### OPERATOR_OR

    public static final int OPERATOR_OR

  The "OR" operator

  See Also:
    Constant Field Values

### OPERATOR_NOT

    public static final int OPERATOR_NOT

  The "NOT" operator

  See Also:
    Constant Field Values

### SEARCH_ENGINE

    public static final java.lang.String SEARCH_ENGINE

  The search engine specification

  See Also:
    Constant Field Values

### defaultOperator

    public static final int defaultOperator

  The default operator, currently set to OPERATOR_AND

  See Also:
    Constant Field Values

### LUCENE_BOOLEAN_QUERY_MAX_CLAUSES

    public static final int LUCENE_BOOLEAN_QUERY_MAX_CLAUSES

Method Detail

### execute

    public Results execute()
                    throws SDXException

  Executes a query and returns results.

  Throws:
    `SDXException`

### getLuceneQuery

    public org.apache.lucene.search.Query getLuceneQuery()

  Returns the internal Lucene representation of the query.

### addBaseQuery

    public void addBaseQuery(Results baseResults,
                             int operator)

  Adds a base query to the current query.

  Parameters:
    `baseResults` - The results obtained from the base query.
    `operator` - The operator linking the query with the base query.

### addBaseQuery

    public void addBaseQuery(Query query,
                             int operator)

  Adds a base query to the current query

  Parameters:
    `query` - The query object
    `operator` - The operator linking the query with the base query

### addSortSpecification

    public void addSortSpecification(SortSpecification ss)

  Adds a sort specification for this query.

  Parameters:
    `ss` - The sort specification.

### addFilter

    public void addFilter(Filter f)

  Adds a filter for this query.

  Parameters:
    `f` - The filter.

### prepare

    public Filter prepare()

  Prepares a query for proper execution.

  This method makes sure that all filters are correctly applied.

  Returns:
    A filter defined for this query.

### getBoost

    public float getBoost()

  Returns the boost on the query.

  This method returns the boost on the query.

  Returns:
    the boost value by a float.

### setBoost

    public void setBoost(float boost)

  Change the boost on the query.

  This method changes the boost on the query to make it more significant.

### setBoost

    public void setBoost(java.lang.String boost)

  Change the boost on the query.

  This method changes the boost on the query to make it more significant. If the String is not a valid float, no changes occur.

### getSearchLocations

    public SearchLocations getSearchLocations()

### setUp

    public void setUp(SearchLocations sLocs,
                      org.apache.lucene.search.Query query)
               throws SDXException

  Throws:
    `SDXException`

### setLuceneQuery

    public void setLuceneQuery(org.apache.lucene.search.Query query)

### getCachedQuery

    public org.apache.lucene.search.Query getCachedQuery()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2007 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.