com.jurismarches.vradi.services.search
Class VradiQueryParser

java.lang.Object
  extended by com.jurismarches.vradi.services.search.VradiQueryParser

public class VradiQueryParser
extends Object

VradiQueryParser supports the analysis of textual queries. Queries are analyzed by the lucene QueryParser, so they must obey his syntax. See at queryparsersyntax.html for a complete documentation. Analyzer used to parse queries is WhitespaceAnalyzer and the default parser operator is QueryParser.Operator.AND.

Since:
0.0.4
Version:
$Revision: 556 $ $Date: 2010-02-24 22:36:49 +0100 (mer., 24 févr. 2010) $
Author:
$Author: schorlet $

Field Summary
static String DEFAULT_FIELD
           
 
Constructor Summary
VradiQueryParser()
           
 
Method Summary
static void buildSearch(FilterList list, org.sharengo.wikitty.search.Search search)
          Appends Filters from the specified list to the specified search.
static FilterList parse(String expression)
          Parses the specified expression and returns a FilterList.
static FilterList parse(String expression, String defaultField)
          Parses the specified expression and returns a FilterList.
static org.sharengo.wikitty.search.Search search(String expression)
          Parses the specified expression and invokes buildSearch(FilterList, Search) with a new Search instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FIELD

public static final String DEFAULT_FIELD
See Also:
Constant Field Values
Constructor Detail

VradiQueryParser

public VradiQueryParser()
Method Detail

parse

public static FilterList parse(String expression)
                        throws UnsupportedQueryException
Parses the specified expression and returns a FilterList.

Parameters:
expression - the expression
Returns:
a FilterList
Throws:
UnsupportedQueryException

parse

public static FilterList parse(String expression,
                               String defaultField)
                        throws UnsupportedQueryException
Parses the specified expression and returns a FilterList.

Parameters:
expression - the expression
defaultField - the default search field
Returns:
a FilterList
Throws:
UnsupportedQueryException

search

public static org.sharengo.wikitty.search.Search search(String expression)
                                                 throws UnsupportedQueryException
Parses the specified expression and invokes buildSearch(FilterList, Search) with a new Search instance.

Parameters:
expression - the expression
Returns:
a Search
Throws:
UnsupportedQueryException

buildSearch

public static void buildSearch(FilterList list,
                               org.sharengo.wikitty.search.Search search)
Appends Filters from the specified list to the specified search.

Parameters:
list - the list of filters
search - the search


Copyright © 2009-2010 JurisMarches. All Rights Reserved.