org.carrot2.source.lucene
Class SimpleFieldMapperDescriptor.AttributeBuilder

java.lang.Object
  extended by org.carrot2.source.lucene.SimpleFieldMapperDescriptor.AttributeBuilder
Enclosing class:
SimpleFieldMapperDescriptor

public static class SimpleFieldMapperDescriptor.AttributeBuilder
extends Object

Attribute map builder for the SimpleFieldMapper component. You can use this builder as a type-safe alternative to populating the attribute map using attribute keys.


Field Summary
 Map<String,Object> map
          The attribute map populated by this builder.
 
Constructor Summary
protected SimpleFieldMapperDescriptor.AttributeBuilder(Map<String,Object> map)
          Creates a builder backed by the provided map.
 
Method Summary
 SimpleFieldMapperDescriptor.AttributeBuilder contentField(String value)
          Document content field name.
 SimpleFieldMapperDescriptor.AttributeBuilder contextFragments(int value)
          Number of context fragments for the highlighter.
 SimpleFieldMapperDescriptor.AttributeBuilder formatter(Class<? extends org.apache.lucene.search.highlight.Formatter> clazz)
          Snippet formatter for the highlighter.
 SimpleFieldMapperDescriptor.AttributeBuilder formatter(org.apache.lucene.search.highlight.Formatter value)
          Snippet formatter for the highlighter.
 SimpleFieldMapperDescriptor.AttributeBuilder fragmentJoin(String value)
          A string used to join context fragments when highlighting.
 SimpleFieldMapperDescriptor.AttributeBuilder searchFields(List<String> value)
          Index search field names.
 SimpleFieldMapperDescriptor.AttributeBuilder titleField(String value)
          Document title field name.
 SimpleFieldMapperDescriptor.AttributeBuilder urlField(String value)
          Document URL field name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

public final Map<String,Object> map
The attribute map populated by this builder.

Constructor Detail

SimpleFieldMapperDescriptor.AttributeBuilder

protected SimpleFieldMapperDescriptor.AttributeBuilder(Map<String,Object> map)
Creates a builder backed by the provided map.

Method Detail

titleField

public SimpleFieldMapperDescriptor.AttributeBuilder titleField(String value)
Document title field name.

See Also:
SimpleFieldMapper.titleField

contentField

public SimpleFieldMapperDescriptor.AttributeBuilder contentField(String value)
Document content field name.

See Also:
SimpleFieldMapper.contentField

urlField

public SimpleFieldMapperDescriptor.AttributeBuilder urlField(String value)
Document URL field name.

See Also:
SimpleFieldMapper.urlField

searchFields

public SimpleFieldMapperDescriptor.AttributeBuilder searchFields(List<String> value)
Index search field names. If not specified, title and content fields are used.

See Also:
SimpleFieldMapper.searchFields

formatter

public SimpleFieldMapperDescriptor.AttributeBuilder formatter(org.apache.lucene.search.highlight.Formatter value)
Snippet formatter for the highlighter. Highlighter is not used if null .

See Also:
SimpleFieldMapper.formatter

formatter

public SimpleFieldMapperDescriptor.AttributeBuilder formatter(Class<? extends org.apache.lucene.search.highlight.Formatter> clazz)
Snippet formatter for the highlighter. Highlighter is not used if null .

See Also:
SimpleFieldMapper.formatter

contextFragments

public SimpleFieldMapperDescriptor.AttributeBuilder contextFragments(int value)
Number of context fragments for the highlighter.

See Also:
SimpleFieldMapper.contextFragments

fragmentJoin

public SimpleFieldMapperDescriptor.AttributeBuilder fragmentJoin(String value)
A string used to join context fragments when highlighting.

See Also:
SimpleFieldMapper.fragmentJoin


Copyright (c) Dawid Weiss, Stanislaw Osinski