public class ConfluenceDocumentBuilder extends Object implements com.atlassian.bonnie.search.DocumentBuilder, org.springframework.beans.factory.InitializingBean
A Confluence specific implementation of the DocumentBuilder that is aware of plugin's and the fact that new document extractors may become available or unavailable based on the current plugins installed.
Since the BaseDocumentBuilder is immutable when the extractors change a new documentBuilder is created.
Produces
documents with of type SearchResultType.CONTENT
.
Modifier and Type | Class and Description |
---|---|
static class |
ConfluenceDocumentBuilder.FieldName |
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_FIELD |
static String |
URL_PATH_FIELD |
Constructor and Description |
---|
ConfluenceDocumentBuilder(com.atlassian.bonnie.HandleResolver handleResolver,
List<com.atlassian.bonnie.search.Extractor> extractors,
com.atlassian.event.api.EventPublisher eventPublisher) |
ConfluenceDocumentBuilder(com.atlassian.bonnie.HandleResolver handleResolver,
com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Deprecated.
since 5.9 - No longer used
|
org.apache.lucene.document.Document |
getDocument(com.atlassian.bonnie.Searchable searchable)
Generates a Lucene document using the extractors defined by construction of BaseDocumentBuilder.
|
com.atlassian.bonnie.Handle |
getHandle(Object obj) |
protected org.apache.lucene.document.Document |
getInitialDocument(com.atlassian.bonnie.Searchable searchable)
Get the initial document that will be passed through the chain of extractors
|
public static final String TYPE_FIELD
public static final String URL_PATH_FIELD
public ConfluenceDocumentBuilder(com.atlassian.bonnie.HandleResolver handleResolver, com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.event.api.EventPublisher eventPublisher)
public ConfluenceDocumentBuilder(com.atlassian.bonnie.HandleResolver handleResolver, List<com.atlassian.bonnie.search.Extractor> extractors, com.atlassian.event.api.EventPublisher eventPublisher)
@Deprecated public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public org.apache.lucene.document.Document getDocument(com.atlassian.bonnie.Searchable searchable)
getDocument
in interface com.atlassian.bonnie.search.DocumentBuilder
searchable
- The object to be processedprotected org.apache.lucene.document.Document getInitialDocument(com.atlassian.bonnie.Searchable searchable)
searchable
- the object the document is being created forpublic com.atlassian.bonnie.Handle getHandle(Object obj)
getHandle
in interface com.atlassian.bonnie.search.DocumentBuilder
Copyright © 2003–2016 Atlassian. All rights reserved.