Package org.nuxeo.ecm.core.storage
Class FulltextQueryAnalyzer
java.lang.Object
org.nuxeo.ecm.core.storage.FulltextQueryAnalyzer
Structured fulltext query analyzer.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Structured fulltext query.static enum
Structured fulltext query operator. -
Field Summary
Modifier and TypeFieldDescriptionprotected static final char
protected static final String
protected FulltextQueryAnalyzer.FulltextQuery
protected static final Pattern
protected static final String
protected static final String
protected static final String
protected static final Pattern
protected static final String
protected List<FulltextQueryAnalyzer.FulltextQuery>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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 sb, String start, String end, Set<Character> reserved) protected void
endAnd()
static boolean
protected boolean
protected String[]
static void
translate
(FulltextQueryAnalyzer.FulltextQuery ft, StringBuilder sb, 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.
-
Field Details
-
SPACE
- See Also:
-
PLUS
- See Also:
-
MINUS
- See Also:
-
CSPACE
protected static final char CSPACE- See Also:
-
DOUBLE_QUOTES
- See Also:
-
OR
- See Also:
-
SEPARATOR
-
IGNORED
-
ft
-
terms
-
-
Constructor Details
-
FulltextQueryAnalyzer
public FulltextQueryAnalyzer()
-
-
Method Details
-
analyze
-
split
-
ignored
-
endAnd
protected void endAnd() -
translate
-
appendWord
-
hasPhrase
-
analyzeFulltextQuery
Analyzes a fulltext query into a generic datastructure that can be used for each specific database.List of terms containing only negative words are suppressed. Otherwise negative words are put at the end of the lists of terms.
-
translateFulltext
public static String translateFulltext(FulltextQueryAnalyzer.FulltextQuery ft, String or, String and, String andNot, String phraseQuote) Translate fulltext into a common pattern used by many servers. -
translateFulltext
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) Translate fulltext into a common pattern used by many servers.
-