Search in sources :

Example 26 with SearchQuery

use of io.vertigo.dynamo.search.model.SearchQuery in project vertigo by KleeGroup.

the class AbstractSearchManagerTest method testFacetListByRange.

/**
 * Test le facettage par range d'une liste.
 */
@Test
public void testFacetListByRange() {
    index(true);
    final SearchQuery searchQuery = SearchQuery.builder(ListFilter.of("*:*")).withFacetStrategy(itemFacetQueryDefinition, EMPTY_SELECTED_FACET_VALUES).build();
    final FacetedQueryResult<Item, SearchQuery> result = searchManager.loadList(itemIndexDefinition, searchQuery, null);
    testFacetResultByRange(result);
}
Also used : SearchQuery(io.vertigo.dynamo.search.model.SearchQuery) Item(io.vertigo.dynamo.search.data.domain.Item) Test(org.junit.Test)

Example 27 with SearchQuery

use of io.vertigo.dynamo.search.model.SearchQuery in project vertigo by KleeGroup.

the class AbstractSearchManagerTest method testFacetListByTerm.

/**
 * Test le facettage par term d'une liste.
 */
@Test
public void testFacetListByTerm() {
    index(true);
    final SearchQuery searchQuery = SearchQuery.builder(ListFilter.of("*:*")).withFacetStrategy(itemFacetQueryDefinition, EMPTY_SELECTED_FACET_VALUES).build();
    final FacetedQueryResult<Item, SearchQuery> result = searchManager.loadList(itemIndexDefinition, searchQuery, null);
    testFacetResultByTerm(result);
}
Also used : SearchQuery(io.vertigo.dynamo.search.model.SearchQuery) Item(io.vertigo.dynamo.search.data.domain.Item) Test(org.junit.Test)

Example 28 with SearchQuery

use of io.vertigo.dynamo.search.model.SearchQuery in project vertigo by KleeGroup.

the class SearchManagerMultiIndexTest method query.

private long query(final String query, final SearchIndexDefinition indexDefinition) {
    // recherche
    final SearchQuery searchQuery = SearchQuery.builder(ListFilter.of(query)).build();
    final FacetedQueryResult<DtObject, SearchQuery> result = searchManager.loadList(indexDefinition, searchQuery, null);
    return result.getCount();
}
Also used : SearchQuery(io.vertigo.dynamo.search.model.SearchQuery) DtObject(io.vertigo.dynamo.domain.model.DtObject)

Aggregations

SearchQuery (io.vertigo.dynamo.search.model.SearchQuery)28 Test (org.junit.Test)24 Item (io.vertigo.dynamo.search.data.domain.Item)14 Car (io.vertigo.dynamo.search_2_4.data.domain.Car)12 DtListState (io.vertigo.dynamo.domain.model.DtListState)10 FacetValue (io.vertigo.dynamo.collections.model.FacetValue)8 DtList (io.vertigo.dynamo.domain.model.DtList)8 ArrayList (java.util.ArrayList)8 HashMap (java.util.HashMap)8 List (java.util.List)8 AbstractTestCaseJU4 (io.vertigo.AbstractTestCaseJU4)4 DefinitionSpace (io.vertigo.core.definition.DefinitionSpace)4 ListFilter (io.vertigo.dynamo.collections.ListFilter)4 FacetDefinition (io.vertigo.dynamo.collections.metamodel.FacetDefinition)4 FacetedQueryDefinition (io.vertigo.dynamo.collections.metamodel.FacetedQueryDefinition)4 Facet (io.vertigo.dynamo.collections.model.Facet)4 FacetedQuery (io.vertigo.dynamo.collections.model.FacetedQuery)4 FacetedQueryResult (io.vertigo.dynamo.collections.model.FacetedQueryResult)4 SelectedFacetValues (io.vertigo.dynamo.collections.model.SelectedFacetValues)4 URI (io.vertigo.dynamo.domain.model.URI)4