следующие два поля, определенные в объектеRangeQuery с полями Integer не дает ожидаемого результата
@Column(name = "min_price")
@Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
@NumericField
@FieldBridge(impl = IntegerBridge.class)
private Integer minPrice;
@Column(name = "max_price")
@Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
@NumericField
@FieldBridge(impl = IntegerBridge.class)
private Integer maxPrice;
полный текст запроса генерируется с использованием EntityManager следующим
BooleanJunction priceBooleanJunction = queryBuilder.bool();
//Building range query for price
if (minPrice != null) {
Query rangeQueryMinPrice = queryBuilder.range().onField("minPrice").above(minPrice).createQuery();
priceBooleanJunction.must(rangeQueryMinPrice);
}
if (maxPrice != null) {
Query rangeQueryMaxPrice = queryBuilder.range().onField("maxPrice").below(maxPrice).createQuery();
priceBooleanJunction.must(rangeQueryMaxPrice);
}
BooleanJunction combainedBoolean = queryBuilder.bool();
if (!priceBooleanJunction.isEmpty()) {
combainedBoolean.must(priceBooleanJunction.createQuery());
}
Query searchQuery = combainedBoolean.createQuery();
FullTextQuery query = fullTextEntityManager.createFullTextQuery(searchQuery, ServiceProvider.class);
LOGGER.info(query.toString());
последний журнал печатает следующую за 40 , 90 вход
FullTextQueryImpl(+minPrice:[40 TO *] +maxPrice:[* TO 90])
База данных
содержит значения (min, max) as (50, 80) и (80, 9 0)
по-прежнему результат пуст.