com.atlassian.confluence.search.contentnames.lucene
Class LuceneQueryTokenizer

java.lang.Object
  extended by com.atlassian.confluence.search.contentnames.lucene.LuceneQueryTokenizer
All Implemented Interfaces:
QueryTokenizer

public class LuceneQueryTokenizer
extends Object
implements QueryTokenizer

The purpose of this class is to wrap the tokens emitted from lucene analysis inside our own QueryTokens so that we can tag some additional meaning. Although we could have modified the 'type' property of lucene tokens, we would have had to tinker with all the analyzers for each of the languages we have, which is not feasible.


Constructor Summary
LuceneQueryTokenizer(org.apache.lucene.analysis.Analyzer unstemmedAnalyzer)
           
 
Method Summary
 List<QueryToken> tokenize(String query)
          Produces query tokens from the specified query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneQueryTokenizer

public LuceneQueryTokenizer(org.apache.lucene.analysis.Analyzer unstemmedAnalyzer)
Method Detail

tokenize

public List<QueryToken> tokenize(String query)
Description copied from interface: QueryTokenizer
Produces query tokens from the specified query.

Specified by:
tokenize in interface QueryTokenizer
Parameters:
query - the query
Returns:
query tokens from the specified query. Returns empty list for null or empty query.


Copyright © 2003–2015 Atlassian. All rights reserved.