fr.gouv.culture.sdx.search.lucene.query
Class LinearQuery

java.lang.Object
  extended byfr.gouv.culture.sdx.utils.SdxObjectImpl
      extended byfr.gouv.culture.sdx.search.lucene.query.AbstractQuery
          extended byfr.gouv.culture.sdx.search.lucene.query.LinearQuery
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled, Query, Query, SdxObject, org.apache.cocoon.xml.XMLizable

public class LinearQuery
extends AbstractQuery

A linear query.

A linear query is made of subqueries linked together with boolean operators. No nesting of queries is allowed here.


Field Summary
 
Fields inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
baseOperator, baseQuery, baseResults, filter, luceneQuery, queryText, searchLocations, sortSpecification
 
Fields inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl
encoding, logger
 
Fields inherited from interface fr.gouv.culture.sdx.search.lucene.query.Query
defaultOperator, OPERATOR_AND, OPERATOR_NOT, OPERATOR_OR, SEARCH_ENGINE
 
Constructor Summary
LinearQuery()
          Creates a query A logger must be set and then this query must be setUp.
 
Method Summary
 void setUp(SearchLocations sLocs, java.lang.String[] queryTerms, java.lang.String[] fields, int[] connectors, int operator)
          Constructs a linear query.
 void toSAX(org.xml.sax.ContentHandler hdl)
          Returns a SAX representation of this acceptRequest.
 
Methods inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
addAttributesLucene, addAttributesText, addBaseQuery, addBaseQuery, addFilter, addSortSpecification, enableLogging, execute, getLuceneQuery, getOperator, getSearchLocations, prepare, setLuceneQuery, setSearchLocations, setUp, setUp
 
Methods inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl
getChildLogger, setEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.gouv.culture.sdx.utils.SdxObject
setEncoding
 

Constructor Detail

LinearQuery

public LinearQuery()
Creates a query

A logger must be set and then this query must be setUp.

See Also:
AbstractQuery.enableLogging(org.apache.avalon.framework.logger.Logger), setUp(fr.gouv.culture.sdx.search.lucene.query.SearchLocations, java.lang.String[], java.lang.String[], int[], int)
Method Detail

setUp

public void setUp(SearchLocations sLocs,
                  java.lang.String[] queryTerms,
                  java.lang.String[] fields,
                  int[] connectors,
                  int operator)
           throws SDXException
Constructs a linear query.

Parameters:
sLocs - The SearchLocations object (indices to be searched).
queryTerms - The query terms.
connectors - The operators.
fields - The field names to search.
operator - The operator for the query (ie AND or OR).
Throws:
SDXException
See Also:
QueryParser.DEFAULT_OPERATOR, QueryParser.OPERATOR_AND, QueryParser.OPERATOR_OR

toSAX

public void toSAX(org.xml.sax.ContentHandler hdl)
           throws org.xml.sax.SAXException,
                  org.apache.cocoon.ProcessingException
Returns a SAX representation of this acceptRequest.

Specified by:
toSAX in interface Query
Specified by:
toSAX in class AbstractQuery
Parameters:
hdl - The ContentHandler to feed with events.
Throws:
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException


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