|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.search.SearchContentField
@StableMinor(version="5.5", sinceVersion="4.0") public class SearchContentField
Field of a SearchContent
object. It represents a piece of the information to be indexed
that has name, value and the following indexing properties:
true
means that the field is searchable and must be used to match its
owner SearchContent
when a search query runs.
true
means that the field must be stored in some way that allow it to
be retrieved when a search query matches the owner SearchContent
.
true
means that the field can be optimized and changed before it is
indexed. Usually a indexing tokenization consists in cleaning whitespaces, removing stop words,
normalizing character casing among other optimization operations.
There are the following predefined fields, that are characterized by their names and have predefined special meaning to the search context:
Field | Description | Field name |
---|---|---|
Identifier | Identifier of the content being indexed. It can be used later to retrieve the content from search index. This field is indexed, stored and not tokenized. | FIELDNAME_ID
|
Title | Title of the content being indexed. Usually is used as the name of the hyperlink in a search results interface. This field is stored, not indexed and not tokenized. | FIELDNAME_TITLE
|
Subtitle | Subtitle of the content being indexed. Usually is presented close to the hyperlink in a search results interface, to present additional information of the content. This field is stored, not indexed and not tokenized. | FIELDNAME_SUBTITLE
|
URL | URL of the content being indexed. Usually is used as the URL of the hyperlink in a search results interface, consisting in an URL that allows the navigation to the content details. This field is stored, not indexed and not tokenized. | FIELDNAME_URL
|
Text | The textual searchable content. This is the only field used by search engines to search for contents based on provided search criteria. This field is indexed, tokenized and not stored. | FIELDNAME_TEXT
|
All information provided in fields is stored by the search engine and retrieved in search
results in SearchHit
objects.
Any field that does not match any of the above predefined field is considered a custom field and will have implementation-specific meaning and behavior.
Field Summary | |
---|---|
static String |
FIELDNAME_ID
Name used by identifier fields. |
static String |
FIELDNAME_SUBTITLE
Name used by subtitle fields. |
static String |
FIELDNAME_TEXT
Name used by text fields. |
static String |
FIELDNAME_TITLE
Name used by title fields. |
static String |
FIELDNAME_URL
Name used by URL fields. |
protected boolean |
indexed
|
protected String |
name
|
protected boolean |
stored
|
protected boolean |
tokenized
|
protected String |
value
|
Constructor Summary | |
---|---|
SearchContentField(String name,
String value,
boolean indexed,
boolean stored,
boolean tokenized)
Constructs a SearchContentField object. |
Method Summary | |
---|---|
SearchContentField |
clone()
|
static SearchContentField |
createIdField(String value)
Creates an identifier field with the given value. |
static SearchContentField |
createSubtitleField(String value)
Creates an subtitle field with the given value. |
static SearchContentField |
createTextField(String value)
Creates an text field with the given value. |
static SearchContentField |
createTitleField(String value)
Creates an title field with the given value. |
static SearchContentField |
createUrlField(String value)
Creates an URL field with the given value. |
String |
getName()
Returns the field name. |
String |
getValue()
Returns the field value. |
boolean |
isIndexed()
Returns the indexed condition of the field. |
boolean |
isStored()
Returns the stored condition of the field. |
boolean |
isTokenized()
Returns the tokenized condition of the field. |
void |
setIndexed(boolean indexed)
Sets the indexed condition of the field. |
void |
setName(String name)
Sets the field name. |
void |
setStored(boolean stored)
Sets the stored condition of the field. |
void |
setTokenized(boolean tokenized)
Sets the tokenized condition of the field. |
void |
setValue(String value)
Sets the field value. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FIELDNAME_ID
An identifier field is the identifier of the content being indexed. It can be used later to retrieve the content from search index.
This field is indexed, stored and not tokenized.
public static final String FIELDNAME_TITLE
A title field is the title of the content being indexed. Usually is used as the name of the hyperlink in a search results interface.
This field is stored, not indexed and not tokenized.
public static final String FIELDNAME_SUBTITLE
A subtitle field is the subtitle of the content being indexed. Usually is presented close to the hyperlink in a search results interface, to present additional information of the content.
This field is stored, not indexed and not tokenized.
public static final String FIELDNAME_URL
An URL field is the URL of the content being indexed. Usually is used as the URL of the hyperlink in a search results interface, consisting in an URL that allows the navigation to the content details.
This field is stored, not indexed and not tokenized.
public static final String FIELDNAME_TEXT
A text field is the textual searchable content. This is the only field used by search engines to search for contents based on provided search criteria.
This field is indexed, tokenized and not stored.
protected String name
protected String value
protected boolean indexed
protected boolean stored
protected boolean tokenized
Constructor Detail |
---|
public SearchContentField(String name, String value, boolean indexed, boolean stored, boolean tokenized)
SearchContentField
object.
name
- field namevalue
- field valueindexed
- true to mark field asstored
- tokenized
- Method Detail |
---|
public static SearchContentField createIdField(String value)
identifier field
with the given value.
value
- field value
public static SearchContentField createTitleField(String value)
title field
with the given value.
value
- field value
public static SearchContentField createSubtitleField(String value)
subtitle field
with the given value.
value
- field value
public static SearchContentField createUrlField(String value)
URL field
with the given value.
value
- field value
public static SearchContentField createTextField(String value)
text field
with the given value.
value
- field value
public String getName()
public void setName(String name)
name
- the field name to setpublic String getValue()
public void setValue(String value)
value
- the field value to set.public boolean isIndexed()
true if the field is indexed.- Since:
- 4.0.4
public void setIndexed(boolean indexed)
indexed
- true if the field must be indexed.- Since:
- 4.0.4
public boolean isTokenized()
true if the field is tokenized.- Since:
- 4.0.4
public void setTokenized(boolean tokenized)
tokenized
- true if the field must be tokenized.- Since:
- 4.0.4
public boolean isStored()
true if the field is stored.- Since:
- 4.0.4
public void setStored(boolean stored)
stored
- true if the field must be stored.- Since:
- 4.0.4
public SearchContentField clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |