Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.search.api.indexing.resources.configuration
Class IndexableFieldDescriptor

java.lang.Object
  extended by org.nuxeo.ecm.core.search.api.indexing.resources.configuration.IndexableFieldDescriptor
All Implemented Interfaces:
java.io.Serializable, IndexableResourceDataConf

public class IndexableFieldDescriptor
extends java.lang.Object
implements IndexableResourceDataConf

Field indexation configuration.

Author:
Julien Anguenot
See Also:
Serialized Form

Constructor Summary
IndexableFieldDescriptor()
           
IndexableFieldDescriptor(java.lang.String name, java.lang.String indexableAnalyzerName, java.lang.String indexableFieldTypeName, boolean stored, boolean indexed, boolean binary, boolean multiple, boolean sortable, java.util.Map<java.lang.String,java.lang.String> termVector, java.util.Map<java.lang.String,java.io.Serializable> properties)
          Deprecated. Use IndexableFieldDescriptor(String,String,String,boolean,boolean,boolean,boolean,boolean,String,Map,Map) instead
IndexableFieldDescriptor(java.lang.String name, java.lang.String indexableAnalyzerName, java.lang.String indexableFieldTypeName, boolean stored, boolean indexed, boolean binary, boolean multiple, boolean sortable, java.lang.String sortOption, java.util.Map<java.lang.String,java.lang.String> termVector, java.util.Map<java.lang.String,java.io.Serializable> properties)
           
 
Method Summary
 java.lang.String getIndexingAnalyzer()
          Returns the analyzer that must be applied on the indexable data at backend level.
 java.lang.String getIndexingName()
          Returns the name of the target indexable data once indexed.
 java.lang.String getIndexingType()
          Returns the target indexing field type.
 java.util.Map<java.lang.String,java.io.Serializable> getProperties()
          Returns a map from of properties bound to this field.
 java.lang.String getSortOption()
          Get a string describing behaviour of this data with respect to sort queries, e.g., case insensitivity.
 java.util.Map<java.lang.String,java.lang.String> getTermVector()
          Returns whether and how a field should have term vectors.
 boolean isBinary()
          Does this data needs to be handled like a binary data?
 boolean isIndexed()
          Returns if whether or not the value will be indexed.
 boolean isMultiple()
          Returns whether or not the value is a multiple one.
 boolean isSortable()
          Say if special care must be taken to make the field sortable.
 boolean isStored()
          Returns if whether or not the value will be stored.
 void setName(java.lang.String name)
           
 void setProperties(java.util.Map<java.lang.String,java.io.Serializable> properties)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexableFieldDescriptor

public IndexableFieldDescriptor()

IndexableFieldDescriptor

@Deprecated
public IndexableFieldDescriptor(java.lang.String name,
                                           java.lang.String indexableAnalyzerName,
                                           java.lang.String indexableFieldTypeName,
                                           boolean stored,
                                           boolean indexed,
                                           boolean binary,
                                           boolean multiple,
                                           boolean sortable,
                                           java.util.Map<java.lang.String,java.lang.String> termVector,
                                           java.util.Map<java.lang.String,java.io.Serializable> properties)
Deprecated. Use IndexableFieldDescriptor(String,String,String,boolean,boolean,boolean,boolean,boolean,String,Map,Map) instead


IndexableFieldDescriptor

public IndexableFieldDescriptor(java.lang.String name,
                                java.lang.String indexableAnalyzerName,
                                java.lang.String indexableFieldTypeName,
                                boolean stored,
                                boolean indexed,
                                boolean binary,
                                boolean multiple,
                                boolean sortable,
                                java.lang.String sortOption,
                                java.util.Map<java.lang.String,java.lang.String> termVector,
                                java.util.Map<java.lang.String,java.io.Serializable> properties)
Method Detail

getIndexingName

public java.lang.String getIndexingName()
Description copied from interface: IndexableResourceDataConf
Returns the name of the target indexable data once indexed.

The name here is not necessarily bound to the resource data key(s).This is the name that aimed at being used at backend level for the target index.

Specified by:
getIndexingName in interface IndexableResourceDataConf
Returns:
the name of the target indexable data index in the backend

setName

public void setName(java.lang.String name)

getIndexingAnalyzer

public java.lang.String getIndexingAnalyzer()
Description copied from interface: IndexableResourceDataConf
Returns the analyzer that must be applied on the indexable data at backend level.

Specified by:
getIndexingAnalyzer in interface IndexableResourceDataConf
Returns:
the analyzer name

getIndexingType

public java.lang.String getIndexingType()
Description copied from interface: IndexableResourceDataConf
Returns the target indexing field type.

Specified by:
getIndexingType in interface IndexableResourceDataConf
Returns:
the field type

isStored

public boolean isStored()
Description copied from interface: IndexableResourceDataConf
Returns if whether or not the value will be stored.

Specified by:
isStored in interface IndexableResourceDataConf
Returns:
true if stored false if unstored.

getTermVector

public java.util.Map<java.lang.String,java.lang.String> getTermVector()
Description copied from interface: IndexableResourceDataConf
Returns whether and how a field should have term vectors. If empty map then no vectorization.

Specified by:
getTermVector in interface IndexableResourceDataConf
Returns:
a map from term vector prop id to term vector prop value.

isIndexed

public boolean isIndexed()
Description copied from interface: IndexableResourceDataConf
Returns if whether or not the value will be indexed.

Specified by:
isIndexed in interface IndexableResourceDataConf
Returns:
true if indexed, false if unindexed.

isMultiple

public boolean isMultiple()
Description copied from interface: IndexableResourceDataConf
Returns whether or not the value is a multiple one.

Specified by:
isMultiple in interface IndexableResourceDataConf
Returns:
true if multiple, false otherwise

isBinary

public boolean isBinary()
Description copied from interface: IndexableResourceDataConf
Does this data needs to be handled like a binary data?

Specified by:
isBinary in interface IndexableResourceDataConf
Returns:
true if binary / false if not.

isSortable

public boolean isSortable()
Description copied from interface: IndexableResourceDataConf
Say if special care must be taken to make the field sortable.

Typically (e.g., with Lucene) a tokenized/stemmed/analyzed field would not be sortable out of the box. The special treatment to restore sortability being potentially very costly, it should be applied only to fields for which isSortable() is true.

A false value doesn't forbid sortability for fields whose indexing digestion doesn't technically prevent sortability.

Specified by:
isSortable in interface IndexableResourceDataConf
Returns:
a boolean

getSortOption

public java.lang.String getSortOption()
Description copied from interface: IndexableResourceDataConf
Get a string describing behaviour of this data with respect to sort queries, e.g., case insensitivity.

Compatibility issues This is new in 5.1.2. Customized implementations of this interface can simply return null, the behavior will then be exactly the same as before.

Specified by:
getSortOption in interface IndexableResourceDataConf
Returns:
the sort option

getProperties

public java.util.Map<java.lang.String,java.io.Serializable> getProperties()
Description copied from interface: IndexableResourceDataConf
Returns a map from of properties bound to this field.

Specified by:
getProperties in interface IndexableResourceDataConf
Returns:
a map from string to serializable.

setProperties

public void setProperties(java.util.Map<java.lang.String,java.io.Serializable> properties)

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.