Class CmsLuceneDocument

    • Constructor Summary

      Constructors 
      Constructor Description
      CmsLuceneDocument​(org.apache.lucene.document.Document doc)
      Public constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCategoryField​(java.util.List<CmsCategory> categories)
      Adds the list of the given categories to this document.
      void addContentField​(byte[] data)
      Adds the given content byte array to this document.
      void addContentLocales​(java.util.Collection<java.util.Locale> locales)
      Adds the locales of the content to this document.
      void addDateField​(java.lang.String name, long date, boolean analyzed)
      Puts the given date into the field with the given name.
      void addFileSizeField​(int length)
      Adds the given file size as field to this document.
      void addPathField​(java.lang.String rootPath)
      Puts the given path into this document.
      void addResourceLocales​(java.util.Collection<java.util.Locale> locales)
      Adds the locales of the resource to this document.
      void addRootPathField​(java.lang.String rootPath)
      Puts the given root path into its default field.
      void addSearchField​(CmsSearchField field, java.lang.String value)
      Adds a dynamic search field to the index.
      void addSuffixField​(java.lang.String suffix)
      Adds the suffix field to the document.
      void addTypeField​(java.lang.String typeName)
      Adds the resource type to this document.
      byte[] getContentBlob()
      Returns the content blob of this document.
      static java.lang.String getDateTerms​(long date)
      Generate a list of date terms for the optimized date range search.
      java.lang.Object getDocument()
      Returns the concrete document as Object to be cast if necessary.
      java.util.List<java.lang.String> getFieldNames()
      Returns all field names of this document.
      java.util.Date getFieldValueAsDate​(java.lang.String fieldName)
      Tries to return the value of the field for the given name as Date, null if the field is empty or if the field is not of the type date.
      java.lang.String getFieldValueAsString​(java.lang.String fieldName)
      Returns the value of the field for the given name as String.
      java.util.List<java.lang.String> getMultivaluedFieldAsStringList​(java.lang.String fieldName)
      Returns the values of a multi-valued field as list of strings.
      java.lang.String getPath()
      Returns the root path of the referenced VFS resource of this document.
      float getScore()
      Returns the score for this document.
      java.lang.String getType()
      Returns the resource type of the referenced VFS resource of this document.
      void setScore​(float score)
      Sets the score for this document.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait