Package org.nuxeo.ecm.core.storage
Class FulltextQueryAnalyzer
java.lang.Object
org.nuxeo.ecm.core.storage.FulltextQueryAnalyzer
Structured fulltext query analyzer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStructured fulltext query.static enumStructured fulltext query operator. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final charprotected static final Stringprotected FulltextQueryAnalyzer.FulltextQueryprotected static final Patternprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Patternprotected static final Stringprotected List<FulltextQueryAnalyzer.FulltextQuery> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FulltextQueryAnalyzer.FulltextQueryanalyzeFulltextQuery(String query) Analyzes a fulltext query into a generic datastructure that can be used for each specific database.protected static voidappendWord(String word, StringBuilder sb, String start, String end, Set<Character> reserved) protected voidendAnd()static booleanprotected booleanprotected String[]static voidtranslate(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 StringtranslateFulltext(FulltextQueryAnalyzer.FulltextQuery ft, String or, String and, String andNot, String phraseQuote) Translate fulltext into a common pattern used by many servers.static StringtranslateFulltext(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.
-