public final class LuceneUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LuceneUtils.LuceneFieldName
Tuple returned from splitLuceneFieldName() function containing name and
type of field.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FIELDLESS_FIELD_NAME
The name of the field under which we store tokens for all fields, so
that we can search for them without a field prefix.
|
| Constructor and Description |
|---|
LuceneUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Long |
dateStringToLong(java.lang.String value) |
static java.lang.String |
extractTextFromHtml(java.lang.String html) |
static Query |
getMatchAnyDocumentQuery() |
static Query |
getMatchNoneQuery() |
static boolean |
isDateString(java.lang.String value)
Checks whether provided string is an ISO-8601 date.
|
static java.lang.Object |
luceneFieldToValue(Fieldable f,
ContentType type) |
static java.lang.String |
makeLuceneFieldName(DocumentPb.Field field) |
static java.lang.String |
makeLuceneFieldName(java.lang.String name,
DocumentPb.FieldValue.ContentType type) |
static java.lang.String |
makeLuceneFieldNameWithExtractedText(DocumentPb.Field field) |
static java.lang.String |
makeLuceneFieldNameWithExtractedText(java.lang.String name,
DocumentPb.FieldValue.ContentType type) |
static Term |
newDeleteTerm(java.lang.String docId) |
static double |
numericFieldToDouble(Fieldable f) |
static LuceneUtils.LuceneFieldName |
splitLuceneFieldName(java.lang.String field) |
static double |
stringValueToDouble(java.lang.String value)
Locale-aware Double parsing.
|
static DocumentPb.Document |
toAppengineDocument(Document d) |
static DocumentPb.Document |
toAppengineDocumentId(Document d) |
static Document |
toLuceneDocument(java.lang.String docId,
DocumentPb.Document input) |
public static final java.lang.String FIELDLESS_FIELD_NAME
public static java.lang.String makeLuceneFieldName(DocumentPb.Field field)
public static java.lang.String makeLuceneFieldName(java.lang.String name,
DocumentPb.FieldValue.ContentType type)
public static java.lang.String makeLuceneFieldNameWithExtractedText(java.lang.String name,
DocumentPb.FieldValue.ContentType type)
public static java.lang.String makeLuceneFieldNameWithExtractedText(DocumentPb.Field field)
public static java.lang.String extractTextFromHtml(java.lang.String html)
public static double stringValueToDouble(java.lang.String value)
public static LuceneUtils.LuceneFieldName splitLuceneFieldName(java.lang.String field)
public static Document toLuceneDocument(java.lang.String docId,
DocumentPb.Document input)
public static java.lang.Long dateStringToLong(java.lang.String value)
throws java.text.ParseException
java.text.ParseExceptionpublic static boolean isDateString(java.lang.String value)
public static double numericFieldToDouble(Fieldable f)
public static java.lang.Object luceneFieldToValue(Fieldable f,
ContentType type)
public static DocumentPb.Document toAppengineDocumentId(Document d)
public static DocumentPb.Document toAppengineDocument(Document d)
public static Query getMatchAnyDocumentQuery()
public static Query getMatchNoneQuery()
public static Term newDeleteTerm(java.lang.String docId)