public class ChangeDocumentBuilder extends Object implements com.atlassian.bonnie.search.DocumentBuilder
Builds a change index document from a historical version of a searchable object.
Produces documents of type SearchResultType.CHANGE
.
Modifier and Type | Class and Description |
---|---|
static class |
ChangeDocumentBuilder.FieldName |
Constructor and Description |
---|
ChangeDocumentBuilder(com.atlassian.bonnie.HandleResolver handleResolver,
List<com.atlassian.bonnie.search.Extractor> extractors,
List<com.atlassian.bonnie.search.Extractor> latestVersionExtractors,
com.atlassian.event.api.EventPublisher eventPublisher) |
ChangeDocumentBuilder(com.atlassian.bonnie.HandleResolver handleResolver,
com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.event.api.EventPublisher eventPublisher)
Constructs a change document builder.
|
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.document.Document |
getDocument(com.atlassian.bonnie.Searchable searchable) |
com.atlassian.bonnie.Handle |
getHandle(Object obj) |
public ChangeDocumentBuilder(com.atlassian.bonnie.HandleResolver handleResolver, com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.event.api.EventPublisher eventPublisher)
handleResolver
- Handle resolver objectpluginAccessor
- Plugin accessor objectIllegalArgumentException
- if handleResolver is nullpublic org.apache.lucene.document.Document getDocument(com.atlassian.bonnie.Searchable searchable)
getDocument
in interface com.atlassian.bonnie.search.DocumentBuilder
searchable
- the searchableIllegalArgumentException
- if the searchable does not contain a valid title/name or the no handle could be determined for the specified searchable using getHandle(Object)
.UnsupportedOperationException
- if the searchable passed in is not a page, blogpost, attachment or commentpublic com.atlassian.bonnie.Handle getHandle(Object obj)
getHandle
in interface com.atlassian.bonnie.search.DocumentBuilder
Copyright © 2003–2016 Atlassian. All rights reserved.