org.mmbase.storage.search
Interface StringSearchConstraint

Package class diagram package StringSearchConstraint
All Superinterfaces:
Constraint, FieldConstraint
All Known Implementing Classes:
BasicStringSearchConstraint

public interface StringSearchConstraint
extends FieldConstraint

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:

The match type specifies how individual words in the search terms are matched with words in the searched text.

The searchterms may containt the following wildchard characters as well:

Depending on searchtype and searchmode, the following parameters can be set:

Since:
MMBase-1.7
Version:
$Id: StringSearchConstraint.java 41186 2010-02-26 17:54:31Z michiel $
Author:
Rob van Maris

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<String,Object> getParameters()
          Gets value of additional parameters.
 List<String> 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, matches
 
Methods inherited from interface org.mmbase.storage.search.Constraint
equals, getBasicSupportLevel, hashCode, isInverse, setUnmodifiable
 

Field Detail

SEARCH_TYPE_WORD_ORIENTED

static final int SEARCH_TYPE_WORD_ORIENTED
Search type for word oriented search.

See Also:
Constant Field Values

SEARCH_TYPE_PHRASE_ORIENTED

static final int SEARCH_TYPE_PHRASE_ORIENTED
Search type for phrase oriented search.

See Also:
Constant Field Values

SEARCH_TYPE_PROXIMITY_ORIENTED

static final int SEARCH_TYPE_PROXIMITY_ORIENTED
Search type for proximity oriented search.

See Also:
Constant Field Values

SEARCH_TYPE_DESCRIPTIONS

static final 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


MATCH_TYPE_LITERAL

static final int MATCH_TYPE_LITERAL
Match type for literal matching.

See Also:
Constant Field Values

MATCH_TYPE_FUZZY

static final int MATCH_TYPE_FUZZY
Match type for fuzzy matching.

See Also:
Constant Field Values

MATCH_TYPE_SYNONYM

static final int MATCH_TYPE_SYNONYM
Match type for synonym matching.

See Also:
Constant Field Values

MATCH_TYPE_DESCRIPTIONS

static final String[] MATCH_TYPE_DESCRIPTIONS
Match type descriptions corresponding to the match type values: MATCH_TYPE_LITERAL, MATCH_TYPE_FUZZY, and MATCH_TYPE_SYNONYM


PARAM_FUZZINESS

static final String PARAM_FUZZINESS
Name for parameter specifying fuzziness for fuzzy matching.

See Also:
Constant Field Values

PARAM_PROXIMITY_LIMIT

static final String PARAM_PROXIMITY_LIMIT
Name for parameter specifying proximity limit for proximity oriented search.

See Also:
Constant Field Values
Method Detail

getSearchType

int getSearchType()
Gets the search type, this specifies how the search is performed.


getParameters

Map<String,Object> getParameters()
Gets value of additional parameters.

Returns:
The parameters, as an unmodifiable Map.

getMatchType

int getMatchType()
Gets the match type.


getSearchTerms

List<String> getSearchTerms()
Gets the list of searchterms.

Returns:
The searchterms, as an unmodifiable List.

toString

String toString()
Returns a string representation of this StringSearchConstraint. The string representation has the form "StringSearchConstraint(inverse:<:inverse>, field:<field>, casesensitive:<casesensitive>, searchtype:<searchtype>, matchtype:<matchtype>, parameters:<parameters>, searchterms:<searchterms>)" where


MMBase2 Bridge 2.0-SNAPSHOT - 2013-03-30T06:34