org.xcmis.search.lucene.index
Class FieldNames

java.lang.Object
  extended by org.xcmis.search.lucene.index.FieldNames

public class FieldNames
extends Object

Defines field names that are used internally to store UUID, etc in the search index.


Field Summary
static String AGGREGATED_NODE_UUID
          Name of the field that contains the UUIDs of the aggregated nodes.
static String FULLTEXT
          Name of the field that contains the fulltext index including terms from all properties of a node.
static String FULLTEXT_PREFIX
          Prefix for all field names that are fulltext indexed by property name.
static String LABEL
          Name of the field that contains the label of the node.
static String LENGTH_PREFIX
          Name of the field that contains the label of the node.
static String MVP
          Name of the field that contains the names of multi-valued properties that hold more than one value.
static String PARENT
          Name of the field that contains the UUID of the parent node.
static String PROPERTIES
          Deprecated. 
static String PROPERTIES_SET
          Name of the field that contains the names of all properties that are set on an indexed node.
static String PROPERTY_PREFIX
          Prefix for all field names that are indexed as single term by property name.
static String TABLE_NAME
          Prefix for table tame field.
static String UUID
          Name of the field that contains the UUID of the node.
 
Method Summary
static String createFieldLengthName(String fieldName)
          Returns a length field name.
static String createFullTextFieldName(String fieldName)
          Returns a named value for use as a term in the index.
static String createNamedValue(String fieldName, String value)
          Deprecated. 
static String createPropertyFieldName(String propertyName)
          Returns a named value for use as a term in the index.
static int getNameLength(String namedValue)
          Returns the length of the field prefix in namedValue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UUID

public static final String UUID
Name of the field that contains the UUID of the node. Terms are stored but not tokenized.


FULLTEXT

public static final String FULLTEXT
Name of the field that contains the fulltext index including terms from all properties of a node. Terms are tokenized.


TABLE_NAME

public static final String TABLE_NAME
Prefix for table tame field.


FULLTEXT_PREFIX

public static final String FULLTEXT_PREFIX
Prefix for all field names that are fulltext indexed by property name.

See Also:
Constant Field Values

PROPERTY_PREFIX

public static final String PROPERTY_PREFIX
Prefix for all field names that are indexed as single term by property name.

See Also:
Constant Field Values

LENGTH_PREFIX

public static final String LENGTH_PREFIX
Name of the field that contains the label of the node. Terms are not tokenized.

See Also:
Constant Field Values

PARENT

public static final String PARENT
Name of the field that contains the UUID of the parent node. Terms are stored and but not tokenized.


LABEL

public static final String LABEL
Name of the field that contains the label of the node. Terms are not tokenized.


MVP

public static final String MVP
Name of the field that contains the names of multi-valued properties that hold more than one value. Terms are not tokenized and not stored, only indexed.


PROPERTIES

@Deprecated
public static final String PROPERTIES
Deprecated. 
Name of the field that contains all values of properties that are indexed as is without tokenizing. Terms are prefixed with the property name.


PROPERTIES_SET

public static final String PROPERTIES_SET
Name of the field that contains the names of all properties that are set on an indexed node.


AGGREGATED_NODE_UUID

public static final String AGGREGATED_NODE_UUID
Name of the field that contains the UUIDs of the aggregated nodes. The terms are not tokenized and not stored, only indexed.

Method Detail

createFieldLengthName

public static String createFieldLengthName(String fieldName)
Returns a length field name.

Parameters:
fieldName - the property name
Returns:
length field name

createFullTextFieldName

public static String createFullTextFieldName(String fieldName)
Returns a named value for use as a term in the index. The named value is of the form: fieldName + '￿' + value

Parameters:
fieldName - the field name.
value - the value.
Returns:
value prefixed with field name.

createNamedValue

@Deprecated
public static String createNamedValue(String fieldName,
                                                 String value)
Deprecated. 

Returns a named value for use as a term in the index. The named value is of the form: fieldName + '￿' + value

Parameters:
fieldName - the field name.
value - the value.
Returns:
value prefixed with field name.

createPropertyFieldName

public static String createPropertyFieldName(String propertyName)
Returns a named value for use as a term in the index. The named value is of the form: fieldName + '￿' + value

Parameters:
fieldName - the field name.
value - the value.
propertyName -
Returns:
value prefixed with field name.

getNameLength

public static int getNameLength(String namedValue)
Returns the length of the field prefix in namedValue. See also createNamedValue(String, String). If namedValue does not contain a name prefix, this method return 0.

Parameters:
namedValue - the named value as created by createNamedValue(String, String).
Returns:
the length of the field prefix including the separator char (￿).


Copyright © 2011 eXo Platform SAS. All Rights Reserved.