lumis.search.lucene
Class LuceneSearchQueryFilterParser

Package class diagram package LuceneSearchQueryFilterParser
java.lang.Object
  extended by lumis.search.lucene.LuceneSearchQueryFilterParser

public class LuceneSearchQueryFilterParser
extends Object

Parses ISearchQueryFilter to Lucene query language.

Since:
4.2.2

Constructor Summary
LuceneSearchQueryFilterParser()
           
 
Method Summary
protected  String escapeClauseTerm(String term)
          Escapes the clause term.
 String parse(ISearchQueryFilter queryFilter)
          A parser to ISearchQueryFilter.
protected  String parseClause(SearchClause searchClause)
          A parser to SearchClause for Lucene.
protected  String parseFilterGroup(SearchFilterGroup searchFilterGroup)
          A parser to SearchFilterGroup for Lucene.
protected  String parseGroupOperator(String operator)
          A parser to SearchFilterGroup.getOperator().
protected  void verifyClauseOperator(String operator)
          A parser to SearchClause.getOperator().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneSearchQueryFilterParser

public LuceneSearchQueryFilterParser()
Method Detail

parse

public String parse(ISearchQueryFilter queryFilter)
A parser to ISearchQueryFilter.

Parameters:
queryFilter - to be parsed.
Returns:
the string query.
Since:
4.2.2

parseGroupOperator

protected String parseGroupOperator(String operator)
A parser to SearchFilterGroup.getOperator(). If the operator is not supported a IllegalArgumentException is given.

Parameters:
operator - to be parsed.
Returns:
the group operator.
Since:
4.2.2

verifyClauseOperator

protected void verifyClauseOperator(String operator)
A parser to SearchClause.getOperator(). If the operator is not supported a IllegalArgumentException is given.

Parameters:
operator -
Since:
4.2.2

parseFilterGroup

protected String parseFilterGroup(SearchFilterGroup searchFilterGroup)
A parser to SearchFilterGroup for Lucene.

Parameters:
searchFilterGroup - to be parsed.
Returns:
the filterGroup or the clause.
Since:
4.2.2

parseClause

protected String parseClause(SearchClause searchClause)
A parser to SearchClause for Lucene. Usually return a string clause like scope:("term1" "term2" ...)

Parameters:
searchClause - to be parsed.
Returns:
the string clause.
Since:
4.2.2

escapeClauseTerm

protected String escapeClauseTerm(String term)
Escapes the clause term.

Parameters:
the - term to be escaped.
Returns:
escaped term.
Since:
4.2.2


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.