|
Qizx/open API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.axyana.qizxopen.dm.FulltextQuery
Full-text queries: parsing, search in fall-back mode (without indexes), term highlighting.
A query is a AND of required and excluded clauses. A clause is a phrase or an alternative of terms. A term is a simple word, a word with wildcards (a la Unix) or an approximate word (uses a generic Soundex-like phonetic algorithm).
Syntax:
query -> clause [ ['AND' | '&']? ['NOT' | '-']? clause]* clause -> ORterm | phrase phrase -> '"' term+ '"' distance? | '\'' term+ '\'' distance? ORterm -> term [ ['OR' | '|'] term]* term -> [ wordchar | '*' | '?' ]+ distance? distance -> '~' integer?
Nested Class Summary | |
static class |
FulltextQuery.Clause
Abstract clause. |
class |
FulltextQuery.Hiliter
Defines the way highlighted words are decorated: a highlighted word is surrounded by an element of the form |
static class |
FulltextQuery.ParseException
|
static class |
FulltextQuery.Phrase
Sequence of terms, with an optional total spacing between terms. |
static class |
FulltextQuery.Term
A simple word or a pattern. |
static class |
FulltextQuery.TermOr
Union of terms. |
Field Summary | |
FulltextQuery.Clause[] |
excluded
|
FulltextQuery.Clause[] |
required
|
WordSifter |
wordSifter
|
Constructor Summary | |
FulltextQuery()
|
Method Summary | |
void |
highlight(Node fragment,
FulltextQuery.Hiliter hiliter,
XMLEventReceiver result)
Highlighting matching nodes inside a document fragment with hiliter patterns. |
boolean |
matches(Node node)
Tells whether the text contents of the node matches this query. |
static FulltextQuery |
parsePhrase(java.lang.String query,
int distance,
WordSifter sifter)
Parses and builds a phrase query: simple sequence of terms without quotes. |
static FulltextQuery |
parseQuery(java.lang.String query,
WordSifter sifter)
Parses and builds a general FulltextQuery. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public FulltextQuery.Clause[] required
public FulltextQuery.Clause[] excluded
public WordSifter wordSifter
Constructor Detail |
public FulltextQuery()
Method Detail |
public java.lang.String toString()
public static FulltextQuery parseQuery(java.lang.String query, WordSifter sifter) throws FulltextQuery.ParseException
query
- parsed query expression.sifter
- used for extracting and normalizing terms.
FulltextQuery.ParseException
public static FulltextQuery parsePhrase(java.lang.String query, int distance, WordSifter sifter) throws FulltextQuery.ParseException
query
- parsed query expression.distance
- maximum number of interspersed words (0 for exact phrase).sifter
- used for extracting and normalizing terms.
FulltextQuery.ParseException
public boolean matches(Node node)
public void highlight(Node fragment, FulltextQuery.Hiliter hiliter, XMLEventReceiver result) throws DataModelException
fragment
- source document fragmenthiliter
- defines the way highlighted words are decorated
(see FulltextQuery.Hiliter
).result
- hilighted output.
DataModelException
|
© 2005 Axyana Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |