|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.source.lucene.SimpleFieldMapper
public class SimpleFieldMapper
A simple IFieldMapper with one-to-one mapping between the default title, url
and summary fields.
| Field Summary | |
|---|---|
String |
contentField
Document content field name. |
int |
contextFragments
Number of context fragments for the highlighter. |
org.apache.lucene.search.highlight.Formatter |
formatter
Snippet formatter for the highlighter. |
String |
fragmentJoin
A string used to join context fragments when highlighting. |
List<String> |
searchFields
Index search field names. |
String |
titleField
Document title field name. |
String |
urlField
Document URL field name. |
| Constructor Summary | |
|---|---|
SimpleFieldMapper()
|
|
| Method Summary | |
|---|---|
String[] |
getSearchFields()
Return the names of search fields in the index. |
void |
map(org.apache.lucene.search.Query luceneQuery,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.document.Document luceneDoc,
Document doc)
Map Lucene index's fields onto Carrot2 Document instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String titleField
public String contentField
public String urlField
public List<String> searchFields
public org.apache.lucene.search.highlight.Formatter formatter
null
.
public int contextFragments
public String fragmentJoin
| Constructor Detail |
|---|
public SimpleFieldMapper()
| Method Detail |
|---|
public String[] getSearchFields()
IFieldMapper
getSearchFields in interface IFieldMapper
public void map(org.apache.lucene.search.Query luceneQuery,
org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.document.Document luceneDoc,
Document doc)
IFieldMapperDocument instance.
It is sensible to map at least Document.CONTENT_URL,
Document.TITLE and
Document.SUMMARY.
map in interface IFieldMapperluceneQuery - Query used to fetch Lucene document from the index. It
is advised to cache any query-related data internally and if this
parameter does not change, reuse that data.analyzer - Analyzer used for creating the index.luceneDoc - Lucene hit.doc - Target Carrot2 document.
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||