public class FulltextQueryAnalyzer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FulltextQueryAnalyzer.FulltextQuery
Structured fulltext query.
|
static class |
FulltextQueryAnalyzer.Op
Structured fulltext query operator.
|
Modifier and Type | Field and Description |
---|---|
protected static char |
CSPACE |
protected static String |
DOUBLE_QUOTES |
protected FulltextQueryAnalyzer.FulltextQuery |
ft |
protected static Pattern |
IGNORED |
protected static String |
MINUS |
protected static String |
OR |
protected static String |
PLUS |
protected static Pattern |
SEPARATOR |
protected static String |
SPACE |
protected List<FulltextQueryAnalyzer.FulltextQuery> |
terms |
Constructor and Description |
---|
FulltextQueryAnalyzer() |
Modifier and Type | Method and Description |
---|---|
protected FulltextQueryAnalyzer.FulltextQuery |
analyze(String query) |
static FulltextQueryAnalyzer.FulltextQuery |
analyzeFulltextQuery(String query)
Analyzes a fulltext query into a generic datastructure that can be used for each specific database.
|
protected static void |
appendWord(String word,
StringBuilder buf,
String start,
String end,
Set<Character> reserved) |
protected void |
endAnd() |
static boolean |
hasPhrase(FulltextQueryAnalyzer.FulltextQuery ft) |
protected boolean |
ignored(String word) |
protected String[] |
split(String query) |
static void |
translate(FulltextQueryAnalyzer.FulltextQuery ft,
StringBuilder buf,
String or,
String and,
String andNot,
String wordStart,
String wordEnd,
Set<Character> wordCharsReserved,
String phraseStart,
String phraseEnd,
boolean quotePhraseWords) |
static String |
translateFulltext(FulltextQueryAnalyzer.FulltextQuery ft,
String or,
String and,
String andNot,
String phraseQuote)
Translate fulltext into a common pattern used by many servers.
|
static String |
translateFulltext(FulltextQueryAnalyzer.FulltextQuery ft,
String or,
String and,
String andNot,
String wordStart,
String wordEnd,
Set<Character> wordCharsReserved,
String phraseStart,
String phraseEnd,
boolean quotePhraseWords)
Translate fulltext into a common pattern used by many servers.
|
protected static final String SPACE
protected static final String PLUS
protected static final String MINUS
protected static final char CSPACE
protected static final String DOUBLE_QUOTES
protected static final String OR
protected FulltextQueryAnalyzer.FulltextQuery ft
protected List<FulltextQueryAnalyzer.FulltextQuery> terms
public FulltextQueryAnalyzer()
protected FulltextQueryAnalyzer.FulltextQuery analyze(String query)
protected void endAnd()
public static void translate(FulltextQueryAnalyzer.FulltextQuery ft, StringBuilder buf, String or, String and, String andNot, String wordStart, String wordEnd, Set<Character> wordCharsReserved, String phraseStart, String phraseEnd, boolean quotePhraseWords)
protected static void appendWord(String word, StringBuilder buf, String start, String end, Set<Character> reserved)
public static boolean hasPhrase(FulltextQueryAnalyzer.FulltextQuery ft)
public static FulltextQueryAnalyzer.FulltextQuery analyzeFulltextQuery(String query)
List of terms containing only negative words are suppressed. Otherwise negative words are put at the end of the lists of terms.
public static String translateFulltext(FulltextQueryAnalyzer.FulltextQuery ft, String or, String and, String andNot, String phraseQuote)
public static String translateFulltext(FulltextQueryAnalyzer.FulltextQuery ft, String or, String and, String andNot, String wordStart, String wordEnd, Set<Character> wordCharsReserved, String phraseStart, String phraseEnd, boolean quotePhraseWords)
Copyright © 2015 Nuxeo SA. All rights reserved.