org.apache.maven.index
Interface QueryCreator

All Known Implementing Classes:
DefaultQueryCreator

public interface QueryCreator

A component the creates Lucene Queries from "human written" queries, but also helps client applications to assemble proper queries for fields they want to search.

Author:
Tamas Cservenak

Field Summary
static String ROLE
           
 
Method Summary
 org.apache.lucene.search.Query constructQuery(Field field, SearchExpression expression)
          Constructs query by parsing the query string, using field as default field.
 org.apache.lucene.search.Query constructQuery(Field field, String query, SearchType type)
          Deprecated. Use constructQuery(Field, SearchExpression) instead.
 org.apache.lucene.search.Query constructQuery(String field, String query)
          Deprecated. Use constructQuery(Field, SearchExpression) instead.
 IndexerField selectIndexerField(Field field, SearchType type)
          Performs a selection of the appropriate IndexerField belonging to proper Field.
 

Field Detail

ROLE

static final String ROLE
Method Detail

selectIndexerField

IndexerField selectIndexerField(Field field,
                                SearchType type)
Performs a selection of the appropriate IndexerField belonging to proper Field.

Parameters:
field -
type -
Returns:

constructQuery

org.apache.lucene.search.Query constructQuery(Field field,
                                              SearchExpression expression)
                                              throws org.apache.lucene.queryParser.ParseException
Constructs query by parsing the query string, using field as default field. This method should be use to construct queries (single term or phrase queries) against single field.

Parameters:
field -
query -
type -
Returns:
Throws:
org.apache.lucene.queryParser.ParseException - if query parsing is unsuccessful.

constructQuery

org.apache.lucene.search.Query constructQuery(Field field,
                                              String query,
                                              SearchType type)
                                              throws org.apache.lucene.queryParser.ParseException
Deprecated. Use constructQuery(Field, SearchExpression) instead.

Constructs query by parsing the query string, using field as default field. This method should be use to construct queries (single term or phrase queries) against single field.

Parameters:
field -
query -
type -
Returns:
Throws:
org.apache.lucene.queryParser.ParseException - if query parsing is unsuccessful.

constructQuery

org.apache.lucene.search.Query constructQuery(String field,
                                              String query)
Deprecated. Use constructQuery(Field, SearchExpression) instead.

Deprecated. Avoid it's use! Constructs query against single field, using it's "best effort" approach to perform parsing, but letting caller to apply it's (usually wrong) knowledge about how field is indexed.

Parameters:
field -
query -
Returns:
query if successfully parsed, or null.


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.