code: @Override
      protected I_CmsSearchDocument appendCategories(
          I_CmsSearchDocument document,
          CmsObject cms,
          CmsResource resource,
          I_CmsExtractionResult extractionResult,
          List<CmsProperty> properties,
          List<CmsProperty> propertiesSearched) {
  
          Document doc = (Document)document.getDocument();
  
          // add the category of the file (this is searched so the value can also be attached on a folder)
          String value = CmsProperty.get(CmsPropertyDefinition.PROPERTY_SEARCH_CATEGORY, propertiesSearched).getValue();
          if (CmsStringUtil.isNotEmpty(value)) {
              // all categories are internally stored lower case
              value = value.trim().toLowerCase();
              if (value.length() > 0) {
                  Field field = new StringField(CmsSearchField.FIELD_CATEGORY, value, Field.Store.YES);
                  // field.setBoost(0);
                  doc.add(field);
              }
          }
          return document;
      }
docs: Extends the given document by resource category information based on properties.<p>
  
  @param document the document to extend
  @param cms the OpenCms context used for building the search index
  @param resource the resource that is indexed
  @param extractionResult the plain text extraction result from the resource
  @param properties the list of all properties directly attached to the resource (not searched)
  @param propertiesSearched the list of all searched properties of the resource
  
  @return the document extended by resource category information
  
  @see org.opencms.search.fields.CmsSearchFieldConfiguration#appendCategories(org.opencms.search.I_CmsSearchDocument, org.opencms.file.CmsObject, org.opencms.file.CmsResource, org.opencms.search.extractors.I_CmsExtractionResult, java.util.List, java.util.List)