Class SolrResourceIndexer

    • Method Detail

      • indexResource

        public void indexResource​(Resource resource,
                                  org.apache.solr.common.SolrInputDocument document,
                                  String documentType)
                           throws Exception
        Index a resource.
        Parameters:
        resource - The resource to index.
        document - The Solr document to index into.
        documentType - The document type of the resource
        Throws:
        Exception - if an error occurs.
      • indexResource

        public void indexResource​(Resource resource,
                                  org.apache.solr.common.SolrInputDocument document,
                                  String documentType,
                                  String language)
                           throws Exception
        Index a resource.
        Parameters:
        resource - The resource to index.
        document - The Solr document to index into.
        documentType - The document type of the resource
        language - The query language.
        Throws:
        Exception - if an error occurs.
      • indexResource

        public void indexResource​(Resource resource,
                                  org.apache.solr.common.SolrInputDocument document,
                                  String documentType,
                                  TraversableAmetysObject resourceRoot)
                           throws Exception
        Index a resource.
        Parameters:
        resource - The resource to index.
        document - The Solr document to index into.
        documentType - The document type of the resource
        resourceRoot - The resource root, can be null. When null, it will have to be computed.
        Throws:
        Exception - if an error occurs.
      • indexResource

        public void indexResource​(Resource resource,
                                  org.apache.solr.common.SolrInputDocument document,
                                  String documentType,
                                  String language,
                                  TraversableAmetysObject resourceRoot)
                           throws Exception
        Index a resource.
        Parameters:
        resource - The resource to index.
        document - The Solr document to index into.
        documentType - The document type of the resource
        language - The language, can be null.
        resourceRoot - The resource root, can be null. When null, it will have to be computed.
        Throws:
        Exception - if an error occurs.
      • _populateDatesOfPage

        protected void _populateDatesOfPage​(Resource resource,
                                            org.apache.solr.common.SolrInputDocument document)
        Populate the solr input document with dates from the resource
        Parameters:
        resource - The resource
        document - The Solr document
      • indexResourceCollection

        public void indexResourceCollection​(ResourceCollection resourceCollection,
                                            org.apache.solr.common.SolrInputDocument document,
                                            String language)
                                     throws Exception
        Index a collection of resources.
        Parameters:
        resourceCollection - the resource collection to index.
        document - The document to index into.
        language - The current language.
        Throws:
        Exception - if an error occurs while indexing.
      • indexResourceContent

        public void indexResourceContent​(Resource resource,
                                         org.apache.solr.common.SolrInputDocument document,
                                         String language)
        Index a resource content (text in case of a document, and Dublin Core metadata).
        Parameters:
        resource - The resource to index.
        document - The document to index into.
        language - The current language, can be null.
      • indexFulltextValue

        protected void indexFulltextValue​(org.apache.solr.common.SolrInputDocument document,
                                          String text,
                                          String language)
        Index a full-text value.
        Parameters:
        document - The document to index into.
        text - The text to index.
        language - The content language, can be null.