use of io.vertigo.dynamo.collections.ListFilter in project vertigo by KleeGroup.
the class SearchManagerStoreTest method doRemove.
private void doRemove(final String query) {
final ListFilter removeQuery = ListFilter.of(query);
searchManager.removeAll(carIndexDefinition, removeQuery);
}
use of io.vertigo.dynamo.collections.ListFilter in project vertigo by KleeGroup.
the class AbstractSearchManagerTest method doRemove.
private void doRemove(final String query) {
final ListFilter removeQuery = ListFilter.of(query);
searchManager.removeAll(itemIndexDefinition, removeQuery);
}
use of io.vertigo.dynamo.collections.ListFilter in project vertigo by KleeGroup.
the class SearchManagerMultiIndexTest method testClean.
/**
* Test de création nettoyage de l'index.
* La création s'effectue dans une seule transaction.
*/
@Test
public void testClean() {
final DefinitionSpace definitionSpace = getApp().getDefinitionSpace();
final SearchIndexDefinition itemIndexDefinition = definitionSpace.resolve(IDX_ITEM, SearchIndexDefinition.class);
final SearchIndexDefinition itemDynIndexDefinition = definitionSpace.resolve(IDX_DYNA_ITEM, SearchIndexDefinition.class);
final ListFilter removeQuery = ListFilter.of("*:*");
searchManager.removeAll(itemIndexDefinition, removeQuery);
searchManager.removeAll(itemDynIndexDefinition, removeQuery);
waitIndexation();
final long size = query("*:*", itemIndexDefinition);
Assert.assertEquals(0, size);
final long sizeDyn = query("*:*", itemDynIndexDefinition);
Assert.assertEquals(0, sizeDyn);
}
use of io.vertigo.dynamo.collections.ListFilter in project vertigo by KleeGroup.
the class SearchDynamicRegistry method createFacetValue.
private static FacetValue createFacetValue(final DslDefinition rangeDefinition) {
final String listFilterString = (String) rangeDefinition.getPropertyValue(SearchGrammar.RANGE_FILTER_PROPERTY);
final ListFilter listFilter = ListFilter.of(listFilterString);
final String label = (String) rangeDefinition.getPropertyValue(KspProperty.LABEL);
final MessageText labelMsg = MessageText.of(label);
final String code = rangeDefinition.getName();
return new FacetValue(code, listFilter, labelMsg);
}
use of io.vertigo.dynamo.collections.ListFilter in project vertigo by KleeGroup.
the class IndexDtListFunctionBuilderImpl method filterByValue.
/**
* {@inheritDoc}
*/
@Override
public IndexDtListFunctionBuilder<D> filterByValue(final String fieldName, final String value) {
Assertion.checkNotNull(value);
// -----
final String escapedValue = value.replace("\"", "\\\"");
final ListFilter listFilter = ListFilter.of(fieldName + ":\"" + escapedValue + "\"");
indexFilterFunction.filter(listFilter);
return this;
}
Aggregations