|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A constraint specifically for advanced types of text searches.
In addition to searchterms, a search type and a match type can be specified:
The search type specifies how the search is performed: Must be one of:
SEARCH_TYPE_WORD_ORIENTED
- searches for the most occurrences of the words in the search terms.
Order and proximity of words is not significant.
SEARCH_TYPE_PHRASE_ORIENTED
- searches for occurrence of the sequence of words in the search terms.
SEARCH_TYPE_PROXIMITY_ORIENTED
- searches for the most occurrences of the words within a given
word distance.
Order of words is not important.
The match type specifies how individual words in the search terms are matched with words in the searched text.
MATCH_TYPE_LITERAL
- exact match only
MATCH_TYPE_FUZZY
- fuzzy match: matches words within the specified number of
typo's as well (specified by parameter PARAM_FUZZINESS)
MATCH_TYPE_SYNONYM
- matches synonyms as well
The searchterms may containt the following wildchard characters as well:
Depending on searchtype and searchmode, the following parameters can be set:
PARAM_FUZZINESS
- Float, specifies maximum allowed number of
typo's per word, expressed as fraction of word length.
(E.g. 0,2 means: maximum 2 typo's for 10 letter words.).MATCH_TYPE_FUZZY.
It can only be set for this match type, and is cleared when
the match type is set to another value.
PARAM_PROXIMITY_LIMIT
- Integer, specifies maximum distance between
searched words.SEARCH_TYPE_PROXIMITY_ORIENTED.
It can only be set for this search type, and is cleared when
the search type is set to another value.
| Field Summary | |
static String[] |
MATCH_TYPE_DESCRIPTIONS
Match type descriptions corresponding to the match type values: MATCH_TYPE_LITERAL, MATCH_TYPE_FUZZY, and
MATCH_TYPE_SYNONYM |
static int |
MATCH_TYPE_FUZZY
Match type for fuzzy matching. |
static int |
MATCH_TYPE_LITERAL
Match type for literal matching. |
static int |
MATCH_TYPE_SYNONYM
Match type for synonym matching. |
static String |
PARAM_FUZZINESS
Name for parameter specifying fuzziness for fuzzy matching. |
static String |
PARAM_PROXIMITY_LIMIT
Name for parameter specifying proximity limit for proximity oriented search. |
static String[] |
SEARCH_TYPE_DESCRIPTIONS
Search type descriptions corresponding to the search type values: SEARCH_TYPE_WORD_ORIENTED, SEARCH_TYPE_PHRASE_ORIENTED, and
SEARCH_TYPE_PROXIMITY_ORIENTED |
static int |
SEARCH_TYPE_PHRASE_ORIENTED
Search type for phrase oriented search. |
static int |
SEARCH_TYPE_PROXIMITY_ORIENTED
Search type for proximity oriented search. |
static int |
SEARCH_TYPE_WORD_ORIENTED
Search type for word oriented search. |
| Method Summary | |
int |
getMatchType()
Gets the match type. |
Map |
getParameters()
Gets value of additional parameters. |
List |
getSearchTerms()
Gets the list of searchterms. |
int |
getSearchType()
Gets the search type, this specifies how the search is performed. |
String |
toString()
Returns a string representation of this StringSearchConstraint. |
| Methods inherited from interface org.mmbase.storage.search.FieldConstraint |
getField, isCaseSensitive |
| Methods inherited from interface org.mmbase.storage.search.Constraint |
equals, getBasicSupportLevel, hashCode, isInverse |
| Field Detail |
public static final int SEARCH_TYPE_WORD_ORIENTED
public static final int SEARCH_TYPE_PHRASE_ORIENTED
public static final int SEARCH_TYPE_PROXIMITY_ORIENTED
public static final String[] SEARCH_TYPE_DESCRIPTIONS
SEARCH_TYPE_WORD_ORIENTED, SEARCH_TYPE_PHRASE_ORIENTED, and
SEARCH_TYPE_PROXIMITY_ORIENTED
public static final int MATCH_TYPE_LITERAL
public static final int MATCH_TYPE_FUZZY
public static final int MATCH_TYPE_SYNONYM
public static final String[] MATCH_TYPE_DESCRIPTIONS
MATCH_TYPE_LITERAL, MATCH_TYPE_FUZZY, and
MATCH_TYPE_SYNONYM
public static final String PARAM_FUZZINESS
public static final String PARAM_PROXIMITY_LIMIT
| Method Detail |
public int getSearchType()
public Map getParameters()
public int getMatchType()
public List getSearchTerms()
public String toString()
isInverse()
getField().getAlias()
isCaseSensitive()
getSearchType()
getMatchType()
getParameters()
getParameters()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||