|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.search.engine.impl.LuceneOptionsImpl
public class LuceneOptionsImpl
A wrapper class for Lucene parameters needed for indexing.
Constructor Summary | |
---|---|
LuceneOptionsImpl(Store store,
org.apache.lucene.document.Field.Index indexMode,
org.apache.lucene.document.Field.TermVector termVector,
float boost)
|
|
LuceneOptionsImpl(Store store,
org.apache.lucene.document.Field.Index indexMode,
org.apache.lucene.document.Field.TermVector termVector,
float boost,
String indexNullAs,
int precisionStep)
|
Method Summary | |
---|---|
void |
addFieldToDocument(String name,
String indexedString,
org.apache.lucene.document.Document document)
Add a new field with the name fieldName to the Lucene Document document using the value
indexedString . |
void |
addNumericFieldToDocument(String fieldName,
Object value,
org.apache.lucene.document.Document document)
Add a new NumericField with the name fieldName to the Lucene Document document
using the value numericValue . |
float |
getBoost()
Prefer the use of LuceneOptions.addFieldToDocument(String, String, org.apache.lucene.document.Document)
over manually building your Field objects and adding them to the Document. |
org.apache.lucene.document.Field.Index |
getIndex()
Prefer the use of LuceneOptions.addFieldToDocument(String, String, org.apache.lucene.document.Document)
over manually building your Field objects and adding them to the Document. |
org.apache.lucene.document.Field.Store |
getStore()
Prefer the use of LuceneOptions.addFieldToDocument(String, String, org.apache.lucene.document.Document)
over manually building your Field objects and adding them to the Document. |
Store |
getStoreStrategy()
Might be useful for a bridge implementation, but not currently part of LuceneOptions API as we are considering to remove the getters. |
org.apache.lucene.document.Field.TermVector |
getTermVector()
Prefer the use of LuceneOptions.addFieldToDocument(String, String, org.apache.lucene.document.Document)
over manually building your Field objects and adding them to the Document. |
String |
indexNullAs()
|
boolean |
isCompressed()
Prefer the use of LuceneOptions.addFieldToDocument(String, String, org.apache.lucene.document.Document)
over manually building your Field objects and adding them to the Document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LuceneOptionsImpl(Store store, org.apache.lucene.document.Field.Index indexMode, org.apache.lucene.document.Field.TermVector termVector, float boost)
public LuceneOptionsImpl(Store store, org.apache.lucene.document.Field.Index indexMode, org.apache.lucene.document.Field.TermVector termVector, float boost, String indexNullAs, int precisionStep)
Method Detail |
---|
public void addFieldToDocument(String name, String indexedString, org.apache.lucene.document.Document document)
LuceneOptions
fieldName
to the Lucene Document document
using the value
indexedString
.
If the indexedString is null then the field is not added to the document.
The field options are following the user declaration:
addFieldToDocument
in interface LuceneOptions
name
- The field nameindexedString
- The value to indexdocument
- the document to which to add the the new fieldpublic void addNumericFieldToDocument(String fieldName, Object value, org.apache.lucene.document.Document document)
LuceneOptions
fieldName
to the Lucene Document document
using the value numericValue
. If the value is not numeric then the field is not added to the document
addNumericFieldToDocument
in interface LuceneOptions
fieldName
- The name of the fieldvalue
- The numeric value, either an Int, Long, Float or Doubledocument
- the document to which to add the the new fieldpublic float getBoost()
LuceneOptions
LuceneOptions.addFieldToDocument(String, String, org.apache.lucene.document.Document)
over manually building your Field objects and adding them to the Document.
getBoost
in interface LuceneOptions
public String indexNullAs()
indexNullAs
in interface LuceneOptions
null
values. null
is returned in case no null token has
been specified.public boolean isCompressed()
LuceneOptions
LuceneOptions.addFieldToDocument(String, String, org.apache.lucene.document.Document)
over manually building your Field objects and adding them to the Document.
To use compression either use #addFieldToDocument or refer
to Lucene documentation to implement your own compression
strategy.
isCompressed
in interface LuceneOptions
true
if the field value is compressed, false
otherwise.public org.apache.lucene.document.Field.Index getIndex()
LuceneOptions
LuceneOptions.addFieldToDocument(String, String, org.apache.lucene.document.Document)
over manually building your Field objects and adding them to the Document.
getIndex
in interface LuceneOptions
public org.apache.lucene.document.Field.Store getStore()
LuceneOptions
LuceneOptions.addFieldToDocument(String, String, org.apache.lucene.document.Document)
over manually building your Field objects and adding them to the Document.
org.apache.lucene.document.Field.Store.YES
if the field is stored
org.apache.lucene.document.Field.Store.NO
otherwise.
To determine if the field must be compressed, use LuceneOptions.isCompressed()
.
Starting from version 3.3, Store.COMPRESS is no longer returned, use LuceneOptions.isCompressed()
To use compression either use #addFieldToDocument or refer
to Lucene documentation to implement your own compression
strategy.
getStore
in interface LuceneOptions
public org.apache.lucene.document.Field.TermVector getTermVector()
LuceneOptions
LuceneOptions.addFieldToDocument(String, String, org.apache.lucene.document.Document)
over manually building your Field objects and adding them to the Document.
getTermVector
in interface LuceneOptions
public Store getStoreStrategy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |