Add new query
This commit is contained in:
parent
eb02e0f18d
commit
33d8f83933
@ -18,7 +18,7 @@ versions:
|
|||||||
DoubleNDPointRangeQuery, IntPointExactQuery, IntNDPointExactQuery, LongPointExactQuery, FloatPointExactQuery,
|
DoubleNDPointRangeQuery, IntPointExactQuery, IntNDPointExactQuery, LongPointExactQuery, FloatPointExactQuery,
|
||||||
FloatPointExactQuery, DoublePointExactQuery, LongNDPointExactQuery, FloatNDPointExactQuery,
|
FloatPointExactQuery, DoublePointExactQuery, LongNDPointExactQuery, FloatNDPointExactQuery,
|
||||||
DoubleNDPointExactQuery, IntPointSetQuery, LongPointSetQuery, FloatPointSetQuery, DoublePointSetQuery,
|
DoubleNDPointExactQuery, IntPointSetQuery, LongPointSetQuery, FloatPointSetQuery, DoublePointSetQuery,
|
||||||
StandardQuery
|
StandardQuery, FieldExistsQuery
|
||||||
]
|
]
|
||||||
Occur: [OccurMust, OccurMustNot, OccurShould, OccurFilter]
|
Occur: [OccurMust, OccurMustNot, OccurShould, OccurFilter]
|
||||||
Sort: [NoSort, NumericSort, ScoreSort, DocSort, RandomSort]
|
Sort: [NoSort, NumericSort, ScoreSort, DocSort, RandomSort]
|
||||||
@ -130,6 +130,10 @@ versions:
|
|||||||
data:
|
data:
|
||||||
field: String
|
field: String
|
||||||
value: double[]
|
value: double[]
|
||||||
|
# Query that matches the existence of a field.
|
||||||
|
FieldExistsQuery:
|
||||||
|
data:
|
||||||
|
field: String
|
||||||
# Query that matches a phrase.
|
# Query that matches a phrase.
|
||||||
PhraseQuery:
|
PhraseQuery:
|
||||||
data:
|
data:
|
||||||
|
@ -11,6 +11,7 @@ import it.cavallium.dbengine.client.query.current.data.DoublePointExactQuery;
|
|||||||
import it.cavallium.dbengine.client.query.current.data.DoublePointRangeQuery;
|
import it.cavallium.dbengine.client.query.current.data.DoublePointRangeQuery;
|
||||||
import it.cavallium.dbengine.client.query.current.data.DoublePointSetQuery;
|
import it.cavallium.dbengine.client.query.current.data.DoublePointSetQuery;
|
||||||
import it.cavallium.dbengine.client.query.current.data.DoubleTermQuery;
|
import it.cavallium.dbengine.client.query.current.data.DoubleTermQuery;
|
||||||
|
import it.cavallium.dbengine.client.query.current.data.FieldExistsQuery;
|
||||||
import it.cavallium.dbengine.client.query.current.data.FloatNDPointExactQuery;
|
import it.cavallium.dbengine.client.query.current.data.FloatNDPointExactQuery;
|
||||||
import it.cavallium.dbengine.client.query.current.data.FloatNDPointRangeQuery;
|
import it.cavallium.dbengine.client.query.current.data.FloatNDPointRangeQuery;
|
||||||
import it.cavallium.dbengine.client.query.current.data.FloatNDTermQuery;
|
import it.cavallium.dbengine.client.query.current.data.FloatNDTermQuery;
|
||||||
@ -223,6 +224,9 @@ public class QueryParser {
|
|||||||
return new org.apache.lucene.search.TermQuery(new Term(doubleNDTermQuery.field(),
|
return new org.apache.lucene.search.TermQuery(new Term(doubleNDTermQuery.field(),
|
||||||
DoublePoint.pack(doubleNDTermQuery.value().toDoubleArray())
|
DoublePoint.pack(doubleNDTermQuery.value().toDoubleArray())
|
||||||
));
|
));
|
||||||
|
case FieldExistsQuery:
|
||||||
|
var fieldExistQuery = (FieldExistsQuery) query;
|
||||||
|
return new org.apache.lucene.search.FieldExistsQuery(fieldExistQuery.field());
|
||||||
case BoostQuery:
|
case BoostQuery:
|
||||||
var boostQuery = (BoostQuery) query;
|
var boostQuery = (BoostQuery) query;
|
||||||
return new org.apache.lucene.search.BoostQuery(toQuery(boostQuery.query(), analyzer), boostQuery.scoreBoost());
|
return new org.apache.lucene.search.BoostQuery(toQuery(boostQuery.query(), analyzer), boostQuery.scoreBoost());
|
||||||
|
Loading…
Reference in New Issue
Block a user