public class LuceneDocumentStructure extends Object
Modifier and Type | Field and Description |
---|---|
static String |
NODE_ID_KEY |
Modifier and Type | Method and Description |
---|---|
static org.apache.lucene.document.Document |
documentRepresentingProperty(long nodeId,
Object value) |
static String |
encodedStringValue(Object value) |
static long |
getNodeId(org.apache.lucene.document.Document from) |
static org.apache.lucene.search.NumericRangeQuery<Double> |
newInclusiveNumericRangeSeekQuery(Number lower,
Number upper)
Range queries are always inclusive, in order to do exclusive range queries the result must be filtered after the
fact.
|
static org.apache.lucene.search.Query |
newRangeSeekByPrefixQuery(String prefix) |
static org.apache.lucene.search.Query |
newRangeSeekByStringQuery(String lower,
boolean includeLower,
String upper,
boolean includeUpper) |
static org.apache.lucene.search.MatchAllDocsQuery |
newScanQuery() |
static org.apache.lucene.search.Query |
newSeekQuery(Object value) |
static org.apache.lucene.search.Query |
newSuffixStringQuery(String suffix) |
static org.apache.lucene.index.Term |
newTermForChangeOrRemove(long nodeId) |
static org.apache.lucene.search.Query |
newWildCardStringQuery(String searchFor) |
static org.apache.lucene.index.TermsEnum |
originalTerms(org.apache.lucene.index.Terms terms,
String fieldKey)
Filters the given
terms to include only terms that were created using fields from
ValueEncoding.encodeField(Object) . |
public static final String NODE_ID_KEY
public static org.apache.lucene.document.Document documentRepresentingProperty(long nodeId, Object value)
public static org.apache.lucene.search.MatchAllDocsQuery newScanQuery()
public static org.apache.lucene.search.Query newSeekQuery(Object value)
public static org.apache.lucene.search.NumericRangeQuery<Double> newInclusiveNumericRangeSeekQuery(Number lower, Number upper)
public static org.apache.lucene.search.Query newRangeSeekByStringQuery(String lower, boolean includeLower, String upper, boolean includeUpper)
public static org.apache.lucene.search.Query newWildCardStringQuery(String searchFor)
public static org.apache.lucene.search.Query newRangeSeekByPrefixQuery(String prefix)
public static org.apache.lucene.search.Query newSuffixStringQuery(String suffix)
public static org.apache.lucene.index.Term newTermForChangeOrRemove(long nodeId)
public static long getNodeId(org.apache.lucene.document.Document from)
public static org.apache.lucene.index.TermsEnum originalTerms(org.apache.lucene.index.Terms terms, String fieldKey) throws IOException
terms
to include only terms that were created using fields from
ValueEncoding.encodeField(Object)
. Internal lucene terms like those created for indexing numeric values
(see javadoc for NumericRangeQuery
class) are skipped. In other words this method returns
TermsEnum
over all terms for the given field that were created using ValueEncoding
.terms
- the terms to be filteredfieldKey
- the corresponding field key
IOException
- if it is not possible to obtain TermsEnum
NumericRangeQuery
,
NumericTokenStream
,
NumericUtils.PRECISION_STEP_DEFAULT
,
NumericUtils.filterPrefixCodedLongs(TermsEnum)
Copyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.