Codota Logo
CmsSearchField.addMapping
Code IndexAdd Codota to your IDE (free)

How to use
addMapping
method
in
org.opencms.search.fields.CmsSearchField

Best Java code snippets using org.opencms.search.fields.CmsSearchField.addMapping (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: org.opencms/org.opencms.workplace.tools.searchindex

/**
 * @see org.opencms.workplace.CmsWidgetDialog#actionCommit()
 */
@Override
public void actionCommit() {
  List<Throwable> errors = new ArrayList<Throwable>();
  try {
    // if new create it first
    boolean found = false;
    Iterator<I_CmsSearchFieldMapping> itMappings = m_field.getMappings().iterator();
    while (itMappings.hasNext()) {
      I_CmsSearchFieldMapping curMapping = itMappings.next();
      if (curMapping.getType().toString().equals(m_mapping.getType().toString())
        && (((curMapping.getParam() == null) && (m_mapping.getParam() == null))
          || (curMapping.getParam().equals(m_mapping.getParam())))) {
        found = true;
      }
    }
    if (!found) {
      m_field.addMapping(m_mapping);
    }
    writeConfiguration();
  } catch (Throwable t) {
    errors.add(t);
  }
  // set the list of errors to display when saving failed
  setCommitErrors(errors);
}
origin: org.opencms/opencms-solr

  CmsSearchField.BOOST_DEFAULT,
  null);
field.addMapping(new CmsSearchFieldMapping(CmsSearchFieldMappingType.CONTENT, null));
result.addField(field);
  0.0f,
  null);
field.addMapping(new CmsSearchFieldMapping(
  CmsSearchFieldMappingType.PROPERTY,
  CmsPropertyDefinition.PROPERTY_TITLE));
field.addMapping(new CmsSearchFieldMapping(
  CmsSearchFieldMappingType.PROPERTY,
  CmsPropertyDefinition.PROPERTY_TITLE));
field.addMapping(new CmsSearchFieldMapping(
  CmsSearchFieldMappingType.PROPERTY,
  CmsPropertyDefinition.PROPERTY_KEYWORDS));
field.addMapping(new CmsSearchFieldMapping(
  CmsSearchFieldMappingType.PROPERTY,
  CmsPropertyDefinition.PROPERTY_DESCRIPTION));
field.addMapping(new CmsSearchFieldMapping(
  CmsSearchFieldMappingType.PROPERTY,
  CmsPropertyDefinition.PROPERTY_TITLE));
field.addMapping(new CmsSearchFieldMapping(
  CmsSearchFieldMappingType.PROPERTY,
  CmsPropertyDefinition.PROPERTY_KEYWORDS));
org.opencms.search.fieldsCmsSearchFieldaddMapping

Javadoc

Adds a new field mapping to the internal list of mappings.

Popular methods of CmsSearchField

  • getMappings
    Returns the mappings for this field.
  • getName
    Returns the name of this field in the Lucene search index.
  • isStored
    Returns true if the content of this field is stored in the Lucene index. Please refer to the Lucene
  • setBoost
    Sets the boost factor for this field from a String value.
  • <init>
  • addUninvertingMappings
    To allow sorting on a field the field must be added to the map given to org.apache.lucene.uninvertin
  • createField
    Creates a Lucene field from the configuration and the provided content. If no valid content is provi
  • getAnalyzer
    Returns the analyzer used for this field.
  • getBoost
    Returns the boost factor of this field. The boost factor is a Lucene function that controls the "imp
  • getDefaultValue
    Returns the default value to use if no content for this field was collected. In case no default is c
  • getDisplayName
    Returns the display name of the field.
  • getDisplayNameForConfiguration
    Returns the displayNameForConfiguration.
  • getDisplayName,
  • getDisplayNameForConfiguration,
  • isCompressed,
  • isDisplayed,
  • isInExcerptAndStored,
  • isIndexed,
  • isTokenizedAndIndexed,
  • setAnalyzer,
  • setCompressed

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • getContentResolver (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now