Class SolrItem


  • public class SolrItem
    extends java.lang.Object
    An item that is easy to add to a SolrServer.
    • Field Detail

      • FIELD_XML_CONTENT

        public static final java.lang.String FIELD_XML_CONTENT
        See Also:
        Constant Field Values
      • FIELD_FILE_CONTENT

        public static final java.lang.String FIELD_FILE_CONTENT
        See Also:
        Constant Field Values
      • FIELD_HIERATCHY_DATE

        public static final java.lang.String FIELD_HIERATCHY_DATE
        See Also:
        Constant Field Values
      • FIELD_ID_RESOURCE

        public static final java.lang.String FIELD_ID_RESOURCE
        See Also:
        Constant Field Values
      • DYNAMIC_STRING_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_STRING_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • DYNAMIC_TEXT_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_TEXT_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • DYNAMIC_URL_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_URL_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • DYNAMIC_DATE_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_DATE_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • DYNAMIC_LIST_DATE_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_LIST_DATE_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • DYNAMIC_LONG_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_LONG_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • DYNAMIC_LIST_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_LIST_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • DYNAMIC_GEOLOC_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_GEOLOC_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • DYNAMIC_GEOJSON_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_GEOJSON_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • DYNAMIC_FLOAT_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_FLOAT_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • DYNAMIC_GEOJSON_ADDRESS_FIELD_SUFFIX

        public static final java.lang.String DYNAMIC_GEOJSON_ADDRESS_FIELD_SUFFIX
        See Also:
        Constant Field Values
      • FIELD_CHILD_DOCUMENTS

        public static final java.lang.String FIELD_CHILD_DOCUMENTS
        See Also:
        Constant Field Values
    • Constructor Detail

      • SolrItem

        public SolrItem()
    • Method Detail

      • getDynamicFields

        public java.util.Map<java.lang.String,​java.lang.Object> getDynamicFields()
        Returns list of all dynamic fields
        Returns:
        the list of all dynamic fields
      • addDynamicField

        public void addDynamicField​(java.lang.String strName,
                                    java.util.Date dValue)
        Add a dynamic field
        Parameters:
        strName - the name of the field
        dValue - the value of the field
      • addDynamicField

        public void addDynamicField​(java.lang.String strName,
                                    java.lang.Long lValue)
        Add a dynamic field
        Parameters:
        strName - the name of the field
        dValue - the value of the field
      • addDynamicField

        public void addDynamicField​(java.lang.String strName,
                                    java.lang.String strValue)
        Add a dynamic field
        Parameters:
        strName - the name of the field
        dValue - the value of the field
      • addDynamicField

        public void addDynamicField​(java.lang.String strName,
                                    java.util.List<java.lang.String> strValue)
        Add a dynamic field
        Parameters:
        strName - the name of the field
        dValue - the value of the field
      • addDynamicFieldListDate

        public void addDynamicFieldListDate​(java.lang.String strName,
                                            java.util.List<java.util.Date> dateValue)
        Add a dynamic field
        Parameters:
        strName - the name of the field
        dateValue - the value of the field
      • addDynamicFieldNotAnalysed

        public void addDynamicFieldNotAnalysed​(java.lang.String strName,
                                               java.lang.String strValue)
        Add a dynamic field
        Parameters:
        strName - the name of the field
        dValue - the value of the field
      • addDynamicFieldGeoloc

        public void addDynamicFieldGeoloc​(java.lang.String strName,
                                          fr.paris.lutece.plugins.leaflet.business.GeolocItem geolocItem,
                                          java.lang.String codeDocumentType)
        Add a dynamic field
        Parameters:
        strName - the name of the field
        geolocItem - a GeolocItem
        codeDocumentType - the codeDocumentType
      • addDynamicField

        public void addDynamicField​(java.lang.String strName,
                                    java.lang.Float value)
        Add a dynamic field
        Parameters:
        strName - the name of the field
        value - the value of the field
      • addDynamicFieldGeoloc

        public void addDynamicFieldGeoloc​(java.lang.String strName,
                                          java.lang.String strAdress,
                                          double dLongitude,
                                          double dLatitude,
                                          java.lang.String codeDocumentType)
        Add a dynamic field
        Parameters:
        strName - the name of the field
        strAdress - the adress of the field
        dLongitude - the longitude of the field
        dLatitude - the latitude of the field
        codeDocumentType - the codeDocumentType
      • addDynamicFieldGeoloc

        public void addDynamicFieldGeoloc​(java.lang.String strName,
                                          java.lang.String strValue,
                                          java.lang.String codeDocumentType)
        Add a dynamic field
        Parameters:
        strName - the name of the field
        strValue - the value of the field which should be a geojson string
        codeDocumentType - the codeDocumentType
      • getUrl

        public java.lang.String getUrl()
        Gets the url
        Returns:
        the url
      • setUrl

        public void setUrl​(java.lang.String strUrl)
        Sets the url
        Parameters:
        strUrl - the url
      • getDate

        public java.util.Date getDate()
        Return the date
        Returns:
        the date
      • setDate

        public void setDate​(java.util.Date lDate)
        Sets the date
        Parameters:
        lDate - the date
      • getTitle

        public java.lang.String getTitle()
        Gets the title
        Returns:
        the title
      • setTitle

        public void setTitle​(java.lang.String strTitle)
        Sets the title
        Parameters:
        strTitle - the title
      • getUid

        public java.lang.String getUid()
        Gets the id
        Returns:
        the id
      • setUid

        public void setUid​(java.lang.String strUid)
        Sets the id
        Parameters:
        strUid - the id
      • getContent

        public java.lang.String getContent()
        Gets the content
        Returns:
        the content
      • setContent

        public void setContent​(java.lang.String strContent)
        Sets the content
        Parameters:
        strContent - the content
      • getSite

        public java.lang.String getSite()
        Gets the site
        Returns:
        the site name
      • setSite

        public void setSite​(java.lang.String strSite)
        Sets the site name
        Parameters:
        strSite - the site name
      • getSummary

        public java.lang.String getSummary()
        Gets the summary
        Returns:
        the summary
      • setSummary

        public void setSummary​(java.lang.String strSummary)
        Sets the summary
        Parameters:
        strSummary - the summary
      • getType

        public java.lang.String getType()
        Gets the type
        Returns:
        the type
      • setType

        public void setType​(java.lang.String strType)
        Sets the type
        Parameters:
        strType - the type
      • getRole

        public java.lang.String getRole()
        Gets the role
        Returns:
        the role
      • setRole

        public void setRole​(java.lang.String strRole)
        Sets the role
        Parameters:
        strRole - the role
      • getXmlContent

        public java.lang.String getXmlContent()
      • setXmlContent

        public void setXmlContent​(java.lang.String strXmlContent)
      • getCategorie

        public java.util.List<java.lang.String> getCategorie()
      • setCategorie

        public void setCategorie​(java.util.List<java.lang.String> strCategorie)
      • getHieDate

        public java.lang.String getHieDate()
      • setHieDate

        public void setHieDate​(java.lang.String strHieDate)
      • getMetadata

        public java.lang.String getMetadata()
        Gets the metadata
        Returns:
        the metadata
      • setMetadata

        public void setMetadata​(java.lang.String strMetadata)
        Sets the metadata
        Parameters:
        strMetadata - the metadata
      • getDocPortletId

        public java.lang.String getDocPortletId()
        Gets the portlet document id
        Returns:
        the portlet document id
      • setDocPortletId

        public void setDocPortletId​(java.lang.String strDocPortletId)
        Sets the portlet document id
        Parameters:
        strDocPortletId - the portlet document id
      • getFileContent

        public java.lang.String getFileContent()
        Returns:
        the strFileContent
      • setFileContent

        public void setFileContent​(java.lang.String strFileContent)
        Parameters:
        strFileContent - the strFileContent to set
      • getIdResource

        public java.lang.String getIdResource()
        Returns:
        the strIdresource
      • setIdResource

        public void setIdResource​(java.lang.String strIdresource)
        Parameters:
        strIdresource - the resource id to set
      • addChildDocument

        public void addChildDocument​(java.lang.String strName,
                                     SolrItem child)
      • addChildDocuments

        public void addChildDocuments​(java.lang.String strName,
                                      java.util.Collection<SolrItem> children)
      • getChildDocuments

        public java.util.Map<java.lang.String,​java.util.Collection<SolrItem>> getChildDocuments()
        Returns the list of child documents, or null if none.
      • getSearchChilDocuments

        public java.util.Map<java.lang.String,​java.util.List<org.apache.solr.common.SolrDocument>> getSearchChilDocuments()
        Returns the list of child solr documents, or null if none.
      • getChilSolrInputDocument

        public java.util.Map<java.lang.String,​java.util.Collection<org.apache.solr.common.SolrInputDocument>> getChilSolrInputDocument()
        Returns the list of child documents, or null if none.
      • hasChildDocuments

        public boolean hasChildDocuments()