public interface SolrDocumentBuilder
<page>
<file-name>index.xml</file-name>
<showAboutAuthor>false</showAboutAuthor>
<showSearchBox>true</showSearchBox>
</page>
into a Solr Document:
<add>
<doc>
<field name="file-name">index.xml</field>
<field name="showAboutAuthor">false</field>
<field name="showSearchBox">true</field>
</doc>
</add>
The Solr document is represent in Java as a SolrInputDocument object, which then can be sent to the server
with
SolrServer.add(SolrInputDocument)
| Modifier and Type | Method and Description |
|---|---|
org.apache.solr.common.SolrInputDocument |
build(String site,
String id,
Map<String,List<String>> fields)
Builds a Solr document from the provided multi value map of fields
|
org.apache.solr.common.SolrInputDocument |
build(String site,
String id,
String xml,
boolean ignoreRootInFieldNames)
Builds a Solr document from the input XML.
|
org.apache.solr.common.params.ModifiableSolrParams |
buildParams(String site,
String id,
String prefix,
String suffix,
Map<String,List<String>> fields)
Builds a set of SolrParams for an update request from the provided multi value map of fields
|
org.apache.solr.common.SolrInputDocument build(String site, String id, String xml, boolean ignoreRootInFieldNames) throws SolrDocumentBuildException
site - the Crafter site name the content belongs toid - value for the "localId" field in the Solr document (final doc id is built as
site:localId)xml - the input XMLignoreRootInFieldNames - ignore the root element of the input XML in field namesSolrDocumentBuildExceptionorg.apache.solr.common.SolrInputDocument build(String site, String id, Map<String,List<String>> fields)
site - the Crafter site name the content belongs toid - value for the "localId" field in the Solr document (final doc id is built as site:localId)fields - fields to add to solr document.org.apache.solr.common.params.ModifiableSolrParams buildParams(String site, String id, String prefix, String suffix, Map<String,List<String>> fields)
site - the Crafter site name the content belongs toprefix - the common prefix for the fields (null or empty for no prefix)suffix - the common suffix for the fields (null or empty for no suffix)id - value for the "localId" field in the Solr document (final doc id is built as site:localId)fields - fields to add to solr document.Copyright © 2018 CrafterCMS. All rights reserved.