Search in sources :

Example 6 with DocumentFactory

use of com.rbmhtechnology.vind.model.DocumentFactory in project vind by RBMHTechnology.

the class SolrSearchServer method buildSolrQuery.

protected SolrQuery buildSolrQuery(ExecutableSuggestionSearch search, DocumentFactory assets, DocumentFactory childFactory) {
    final String searchContext = search.getSearchContext();
    final SolrQuery query = new SolrQuery();
    query.setRequestHandler("/suggester");
    if (search.isStringSuggestion()) {
        StringSuggestionSearch s = (StringSuggestionSearch) search;
        query.setParam("suggestion.field", s.getSuggestionFields().stream().map(name -> {
            if (Objects.nonNull(childFactory)) {
                final FieldDescriptor<?> field = Objects.nonNull(assets.getField(name)) ? assets.getField(name) : childFactory.getField(name);
                if (Objects.isNull(field)) {
                    log.warn("No field descriptor found for field name {} in factories: {}, {}", name, assets.getType(), childFactory.getType());
                }
                return getFieldname(field, UseCase.Suggest, searchContext);
            } else {
                if (Objects.isNull(assets.getField(name))) {
                    log.warn("No field descriptor found for field name {} in factory: {}", name, assets.getType());
                }
                return getFieldname(assets.getField(name), UseCase.Suggest, searchContext);
            }
        }).filter(Objects::nonNull).toArray(String[]::new));
    } else {
        DescriptorSuggestionSearch s = (DescriptorSuggestionSearch) search;
        query.setParam("suggestion.field", s.getSuggestionFields().stream().map(descriptor -> getFieldname(descriptor, UseCase.Suggest, searchContext)).filter(Objects::nonNull).toArray(String[]::new));
    }
    query.setParam("q", search.getInput());
    // TODO: somehow this is still needed here, it should by configuration
    query.setParam("suggestion.df", SUGGESTION_DF_FIELD);
    query.setParam("suggestion.limit", String.valueOf(search.getLimit()));
    String parentTypeFilter = "_type_:" + assets.getType();
    if (Objects.nonNull(childFactory)) {
        parentTypeFilter = "(" + parentTypeFilter + " OR _type_:" + childFactory.getType() + ")";
    }
    query.add(CommonParams.FQ, parentTypeFilter);
    // filters
    if (search.hasFilter()) {
        SolrUtils.Query.buildFilterString(search.getFilter(), assets, childFactory, query, searchContext, false);
        new SolrChildrenSerializerVisitor(assets, childFactory, searchContext, false);
    }
    // suggestion deep search
    if (Objects.nonNull(childFactory)) {
        if (search.hasFilter()) {
            // TODO clean up!
            final String parentFilterQuery = "(" + String.join(" AND ", query.getFilterQueries()) + ")";
            final String childrenFilterQuery = search.getFilter().accept(new SolrChildrenSerializerVisitor(assets, childFactory, searchContext, false));
            final String childrenBJQ = "{!child of=\"_type_:" + assets.getType() + "\" v='" + childrenFilterQuery + "'}";
            query.set(CommonParams.FQ, String.join(" ", parentFilterQuery, "OR", childrenBJQ));
        }
    }
    return query;
}
Also used : Delete(com.rbmhtechnology.vind.api.query.delete.Delete) SearchServerException(com.rbmhtechnology.vind.SearchServerException) URISyntaxException(java.net.URISyntaxException) ZonedDateTime(java.time.ZonedDateTime) LoggerFactory(org.slf4j.LoggerFactory) Asserts(org.apache.http.util.Asserts) StringUtils(org.apache.commons.lang3.StringUtils) SolrServerException(org.apache.solr.client.solrj.SolrServerException) Fieldname(com.rbmhtechnology.vind.solr.backend.SolrUtils.Fieldname) Facet(com.rbmhtechnology.vind.api.query.facet.Facet) UpdateOperation(com.rbmhtechnology.vind.api.query.update.UpdateOperation) ParseException(java.text.ParseException) FileSystemUtils(com.rbmhtechnology.vind.utils.FileSystemUtils) Path(java.nio.file.Path) SearchServer(com.rbmhtechnology.vind.api.SearchServer) Slice(com.rbmhtechnology.vind.api.query.division.Slice) AnnotationUtil(com.rbmhtechnology.vind.annotations.AnnotationUtil) SchemaResponse(org.apache.solr.client.solrj.response.schema.SchemaResponse) Update(com.rbmhtechnology.vind.api.query.update.Update) SchemaRequest(org.apache.solr.client.solrj.request.schema.SchemaRequest) DescriptorSuggestionSearch(com.rbmhtechnology.vind.api.query.suggestion.DescriptorSuggestionSearch) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) com.rbmhtechnology.vind.api.query(com.rbmhtechnology.vind.api.query) RealTimeGet(com.rbmhtechnology.vind.api.query.get.RealTimeGet) Stream(java.util.stream.Stream) HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient) SolrPingResponse(org.apache.solr.client.solrj.response.SolrPingResponse) SolrQuery(org.apache.solr.client.solrj.SolrQuery) com.rbmhtechnology.vind.api.result(com.rbmhtechnology.vind.api.result) ClientUtils(org.apache.solr.client.solrj.util.ClientUtils) ServiceProvider(com.rbmhtechnology.vind.api.ServiceProvider) SolrInputDocument(org.apache.solr.common.SolrInputDocument) Interval(com.rbmhtechnology.vind.api.query.facet.Interval) SolrRequest(org.apache.solr.client.solrj.SolrRequest) java.util(java.util) ExecutableSuggestionSearch(com.rbmhtechnology.vind.api.query.suggestion.ExecutableSuggestionSearch) FieldDescriptor(com.rbmhtechnology.vind.model.FieldDescriptor) NumberFormat(java.text.NumberFormat) UpdateOperations.set(com.rbmhtechnology.vind.api.query.update.Update.UpdateOperations.set) CollectionUtils(org.apache.commons.collections.CollectionUtils) SearchConfiguration(com.rbmhtechnology.vind.configure.SearchConfiguration) Logger(org.slf4j.Logger) StringSuggestionSearch(com.rbmhtechnology.vind.api.query.suggestion.StringSuggestionSearch) LatLng(com.rbmhtechnology.vind.model.value.LatLng) Resources(com.google.common.io.Resources) DateUtil(org.apache.solr.common.util.DateUtil) QueryResponse(org.apache.solr.client.solrj.response.QueryResponse) org.apache.solr.common.params(org.apache.solr.common.params) IOException(java.io.IOException) NamedList(org.apache.solr.common.util.NamedList) Document(com.rbmhtechnology.vind.api.Document) SolrClient(org.apache.solr.client.solrj.SolrClient) SolrDocument(org.apache.solr.common.SolrDocument) DocumentFactory(com.rbmhtechnology.vind.model.DocumentFactory) Page(com.rbmhtechnology.vind.api.query.division.Page) UpdateOperations(com.rbmhtechnology.vind.api.query.update.Update.UpdateOperations) DescriptorSuggestionSearch(com.rbmhtechnology.vind.api.query.suggestion.DescriptorSuggestionSearch) StringSuggestionSearch(com.rbmhtechnology.vind.api.query.suggestion.StringSuggestionSearch) SolrQuery(org.apache.solr.client.solrj.SolrQuery) FieldDescriptor(com.rbmhtechnology.vind.model.FieldDescriptor)

Example 7 with DocumentFactory

use of com.rbmhtechnology.vind.model.DocumentFactory in project vind by RBMHTechnology.

the class SolrSearchServer method getRawQuery.

@Override
public <T> String getRawQuery(FulltextSearch search, Class<T> c) {
    final DocumentFactory factory = AnnotationUtil.createDocumentFactory(c);
    final SolrQuery query = buildSolrQuery(search, factory);
    return query.toString();
}
Also used : DocumentFactory(com.rbmhtechnology.vind.model.DocumentFactory) SolrQuery(org.apache.solr.client.solrj.SolrQuery)

Example 8 with DocumentFactory

use of com.rbmhtechnology.vind.model.DocumentFactory in project vind by RBMHTechnology.

the class SolrSearchServer method buildSolrQuery.

protected SolrQuery buildSolrQuery(FulltextSearch search, DocumentFactory factory) {
    // build query
    final SolrQuery query = new SolrQuery();
    final String searchContext = search.getSearchContext();
    if (search.getTimeZone() != null) {
        query.set(CommonParams.TZ, search.getTimeZone());
    }
    // fulltext search
    query.set(CommonParams.Q, search.getSearchString());
    if (SearchConfiguration.get(SearchConfiguration.SEARCH_RESULT_SHOW_SCORE, true)) {
        query.set(CommonParams.FL, "*,score");
    } else {
        query.set(CommonParams.FL, "*");
    }
    if (search.getGeoDistance() != null) {
        final FieldDescriptor descriptor = factory.getField(search.getGeoDistance().getFieldName());
        if (Objects.nonNull(descriptor)) {
            query.setParam(CommonParams.FL, query.get(CommonParams.FL) + "," + DISTANCE + ":geodist()");
            query.setParam("pt", search.getGeoDistance().getLocation().toString());
            query.setParam("sfield", getFieldname(descriptor, UseCase.Facet, searchContext));
        }
    }
    Collection<FieldDescriptor<?>> fulltext = factory.listFields().stream().filter(FieldDescriptor::isFullText).collect(Collectors.toList());
    if (!fulltext.isEmpty()) {
        query.setParam(DisMaxParams.QF, SolrUtils.Query.buildQueryFieldString(fulltext, searchContext));
        query.setParam("defType", "edismax");
    } else {
        query.setParam(CommonParams.DF, TEXT);
    }
    // filters
    query.add(CommonParams.FQ, "_type_:" + factory.getType());
    if (search.hasFilter()) {
        SolrUtils.Query.buildFilterString(search.getFilter(), factory, search.getChildrenFactory(), query, searchContext, search.getStrict());
    }
    // fulltext search deep search
    if (search.isChildrenSearchEnabled()) {
        // append childCount facet
        search.facet(new Facet.SubdocumentFacet(factory));
        // TODO: move to SolrUtils
        final String parentSearchQuery = "((" + query.get(CommonParams.Q) + ") AND " + TYPE + ":" + factory.getType() + ")";
        final String childrenSearchQuery = "_query_:\"{!parent which=" + TYPE + ":" + factory.getType() + "}(" + TYPE + ":" + search.getChildrenFactory().getType() + " AND (" + search.getChildrenSearchString().getEscapedSearchString() + "))\"";
        query.set(CommonParams.Q, String.join(" ", parentSearchQuery, search.getChildrenSearchOperator().name(), childrenSearchQuery));
        if (search.getChildrenSearchString().hasFilter()) {
            // TODO clean up!
            final String parentFilterQuery = "(" + String.join(" AND ", query.getFilterQueries()) + ")";
            final String childrenFilterQuery = search.getChildrenSearchString().getFilter().accept(new SolrChildrenSerializerVisitor(factory, search.getChildrenFactory(), searchContext, search.getStrict()));
            query.set(CommonParams.FQ, String.join(" ", parentFilterQuery, search.getChildrenSearchOperator().name(), "(" + childrenFilterQuery + ")"));
        }
    }
    if (search.hasFacet()) {
        query.setFacet(true);
        query.setFacetMinCount(search.getFacetMinCount());
        query.setFacetLimit(search.getFacetLimit());
        // Query facets
        search.getFacets().values().stream().filter(facet -> Facet.QueryFacet.class.isAssignableFrom(facet.getClass())).map(genericFacet -> (Facet.QueryFacet) genericFacet).forEach(queryFacet -> query.addFacetQuery(StringUtils.join(SolrUtils.Query.buildSolrFacetCustomName(SolrUtils.Query.buildFilterString(queryFacet.getFilter(), factory, search.getChildrenFactory(), searchContext, search.getStrict()), queryFacet))));
        // Numeric Range facet
        search.getFacets().values().stream().filter(facet -> Facet.NumericRangeFacet.class.isAssignableFrom(facet.getClass())).map(genericFacet -> (Facet.NumericRangeFacet) genericFacet).forEach(numericRangeFacet -> {
            final UseCase useCase = UseCase.valueOf(numericRangeFacet.getScope().name());
            final String fieldName = getFieldname(numericRangeFacet.getFieldDescriptor(), useCase, searchContext);
            query.add(FacetParams.FACET_RANGE, SolrUtils.Query.buildSolrFacetCustomName(fieldName, numericRangeFacet));
            query.add(String.format(Locale.ROOT, "f.%s.%s", fieldName, FacetParams.FACET_RANGE_START), numericRangeFacet.getStart().toString());
            query.add(String.format(Locale.ROOT, "f.%s.%s", fieldName, FacetParams.FACET_RANGE_END), numericRangeFacet.getEnd().toString());
            query.add(String.format(Locale.ROOT, "f.%s.%s", fieldName, FacetParams.FACET_RANGE_GAP), numericRangeFacet.getGap().toString());
        /*query.addNumericRangeFacet(
                                    SolrUtils.Query.buildSolrFacetCustomName(fieldName, numericRangeFacet.getName()),
                                    numericRangeFacet.getStart(),
                                    numericRangeFacet.getEnd(),
                                    numericRangeFacet.getGap());*/
        });
        // Interval Range facet
        search.getFacets().values().stream().filter(facet -> Facet.IntervalFacet.class.isAssignableFrom(facet.getClass())).map(genericFacet -> (Facet.IntervalFacet) genericFacet).forEach(intervalFacet -> {
            final UseCase useCase = UseCase.valueOf(intervalFacet.getScope().name());
            final String fieldName = getFieldname(intervalFacet.getFieldDescriptor(), useCase, searchContext);
            query.add(FacetParams.FACET_INTERVAL, SolrUtils.Query.buildSolrFacetKey(intervalFacet.getName()) + fieldName);
            for (Object o : intervalFacet.getIntervals()) {
                // TODO why is this necessary?
                Interval i = (Interval) o;
                query.add(String.format("f.%s.%s", fieldName, FacetParams.FACET_INTERVAL_SET), String.format("%s%s%s,%s%s", SolrUtils.Query.buildSolrFacetKey(i.getName()), i.includesStart() ? "[" : "(", i.getStart() == null ? SOLR_WILDCARD : SolrUtils.Query.buildSolrQueryValue(i.getStart()), i.getEnd() == null ? SOLR_WILDCARD : SolrUtils.Query.buildSolrQueryValue(i.getEnd()), i.includesEnd() ? "]" : ")"));
            }
        });
        // Date Range facet
        search.getFacets().values().stream().filter(facet -> Facet.DateRangeFacet.class.isAssignableFrom(facet.getClass())).map(genericFacet -> (Facet.DateRangeFacet) genericFacet).forEach(dateRangeFacet -> generateDateRangeQuery(dateRangeFacet, query, searchContext));
        // stats
        search.getFacets().values().stream().filter(facet -> Facet.StatsFacet.class.isAssignableFrom(facet.getClass())).map(genericFacet -> (Facet.StatsFacet) genericFacet).forEach(statsFacet -> {
            final UseCase useCase = UseCase.valueOf(statsFacet.getScope().name());
            String fieldName = getFieldname(statsFacet.getField(), useCase, searchContext);
            query.add(StatsParams.STATS, "true");
            query.add(StatsParams.STATS_FIELD, SolrUtils.Query.buildSolrStatsQuery(fieldName, statsFacet));
        });
        // pivot facet
        search.getFacets().values().stream().filter(facet -> Facet.PivotFacet.class.isAssignableFrom(facet.getClass())).map(genericFacet -> (Facet.PivotFacet) genericFacet).forEach(pivotFacet -> {
            String[] fieldNames = pivotFacet.getFieldDescriptors().stream().map(fieldDescriptor -> getFieldname(fieldDescriptor, UseCase.Facet, searchContext)).toArray(String[]::new);
            query.add(FacetParams.FACET_PIVOT, SolrUtils.Query.buildSolrPivotSubFacetName(pivotFacet.getName(), fieldNames));
        });
        // facet fields
        final HashMap<String, Object> strings = SolrUtils.Query.buildJsonTermFacet(search.getFacets(), search.getFacetLimit(), factory, search.getChildrenFactory(), searchContext);
        query.add("json.facet", strings.toString().replaceAll("=", ":"));
        // facet Subdocument count
        final String subdocumentFacetString = SolrUtils.Query.buildSubdocumentFacet(search, factory, searchContext);
        if (Objects.nonNull(subdocumentFacetString)) {
            query.add("json.facet", subdocumentFacetString);
        }
    }
    // sorting
    if (search.hasSorting()) {
        final String sortString = SolrUtils.Query.buildSortString(search, search.getSorting(), factory);
        query.set(CommonParams.SORT, sortString);
    }
    // TODO this is a mess
    if (search.hasSorting()) {
        query.set(DisMaxParams.BF, SolrUtils.Query.buildBoostFunction(search.getSorting(), searchContext));
    }
    // paging
    switch(search.getResultSet().getType()) {
        case page:
            {
                final Page resultSet = (Page) search.getResultSet();
                query.setStart(resultSet.getOffset());
                query.setRows(resultSet.getPagesize());
                break;
            }
        case slice:
            {
                final Slice resultSet = (Slice) search.getResultSet();
                query.setStart(resultSet.getOffset());
                query.setRows(resultSet.getSliceSize());
                break;
            }
    }
    return query;
}
Also used : Delete(com.rbmhtechnology.vind.api.query.delete.Delete) SearchServerException(com.rbmhtechnology.vind.SearchServerException) URISyntaxException(java.net.URISyntaxException) ZonedDateTime(java.time.ZonedDateTime) LoggerFactory(org.slf4j.LoggerFactory) Asserts(org.apache.http.util.Asserts) StringUtils(org.apache.commons.lang3.StringUtils) SolrServerException(org.apache.solr.client.solrj.SolrServerException) Fieldname(com.rbmhtechnology.vind.solr.backend.SolrUtils.Fieldname) Facet(com.rbmhtechnology.vind.api.query.facet.Facet) UpdateOperation(com.rbmhtechnology.vind.api.query.update.UpdateOperation) ParseException(java.text.ParseException) FileSystemUtils(com.rbmhtechnology.vind.utils.FileSystemUtils) Path(java.nio.file.Path) SearchServer(com.rbmhtechnology.vind.api.SearchServer) Slice(com.rbmhtechnology.vind.api.query.division.Slice) AnnotationUtil(com.rbmhtechnology.vind.annotations.AnnotationUtil) SchemaResponse(org.apache.solr.client.solrj.response.schema.SchemaResponse) Update(com.rbmhtechnology.vind.api.query.update.Update) SchemaRequest(org.apache.solr.client.solrj.request.schema.SchemaRequest) DescriptorSuggestionSearch(com.rbmhtechnology.vind.api.query.suggestion.DescriptorSuggestionSearch) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) com.rbmhtechnology.vind.api.query(com.rbmhtechnology.vind.api.query) RealTimeGet(com.rbmhtechnology.vind.api.query.get.RealTimeGet) Stream(java.util.stream.Stream) HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient) SolrPingResponse(org.apache.solr.client.solrj.response.SolrPingResponse) SolrQuery(org.apache.solr.client.solrj.SolrQuery) com.rbmhtechnology.vind.api.result(com.rbmhtechnology.vind.api.result) ClientUtils(org.apache.solr.client.solrj.util.ClientUtils) ServiceProvider(com.rbmhtechnology.vind.api.ServiceProvider) SolrInputDocument(org.apache.solr.common.SolrInputDocument) Interval(com.rbmhtechnology.vind.api.query.facet.Interval) SolrRequest(org.apache.solr.client.solrj.SolrRequest) java.util(java.util) ExecutableSuggestionSearch(com.rbmhtechnology.vind.api.query.suggestion.ExecutableSuggestionSearch) FieldDescriptor(com.rbmhtechnology.vind.model.FieldDescriptor) NumberFormat(java.text.NumberFormat) UpdateOperations.set(com.rbmhtechnology.vind.api.query.update.Update.UpdateOperations.set) CollectionUtils(org.apache.commons.collections.CollectionUtils) SearchConfiguration(com.rbmhtechnology.vind.configure.SearchConfiguration) Logger(org.slf4j.Logger) StringSuggestionSearch(com.rbmhtechnology.vind.api.query.suggestion.StringSuggestionSearch) LatLng(com.rbmhtechnology.vind.model.value.LatLng) Resources(com.google.common.io.Resources) DateUtil(org.apache.solr.common.util.DateUtil) QueryResponse(org.apache.solr.client.solrj.response.QueryResponse) org.apache.solr.common.params(org.apache.solr.common.params) IOException(java.io.IOException) NamedList(org.apache.solr.common.util.NamedList) Document(com.rbmhtechnology.vind.api.Document) SolrClient(org.apache.solr.client.solrj.SolrClient) SolrDocument(org.apache.solr.common.SolrDocument) DocumentFactory(com.rbmhtechnology.vind.model.DocumentFactory) Page(com.rbmhtechnology.vind.api.query.division.Page) UpdateOperations(com.rbmhtechnology.vind.api.query.update.Update.UpdateOperations) Page(com.rbmhtechnology.vind.api.query.division.Page) SolrQuery(org.apache.solr.client.solrj.SolrQuery) FieldDescriptor(com.rbmhtechnology.vind.model.FieldDescriptor) Slice(com.rbmhtechnology.vind.api.query.division.Slice) Facet(com.rbmhtechnology.vind.api.query.facet.Facet) Interval(com.rbmhtechnology.vind.api.query.facet.Interval)

Example 9 with DocumentFactory

use of com.rbmhtechnology.vind.model.DocumentFactory in project vind by RBMHTechnology.

the class IntervalFacetsTest method testQueryBuilder.

@Test
public void testQueryBuilder() {
    SolrClient client = Mockito.mock(SolrClient.class);
    SolrSearchServer server = new SolrSearchServer(client, false);
    FieldDescriptor<Integer> descriptor = Mockito.mock(FieldDescriptor.class);
    when(descriptor.getType()).thenReturn(Integer.class);
    when(descriptor.isFacet()).thenReturn(true);
    DocumentFactory factory = Mockito.mock(DocumentFactory.class);
    FulltextSearch search = Search.fulltext().facet(interval("quality", descriptor, Interval.numericInterval("low", 0, 2, true, false), Interval.numericInterval("high", 3, 4)));
    SolrQuery query = server.buildSolrQuery(search, factory);
    assertEquals("{!key=quality}dynamic_single_facet_int_null", query.get("facet.interval"));
// assertThat(Arrays.asList(query.getParams("f.dynamic_single_int_null.facet.interval.set")), contains("{!key=low}[0,2)", "{!key=high}[3,4]")); TODO fix hamcrest dependency
}
Also used : DocumentFactory(com.rbmhtechnology.vind.model.DocumentFactory) SolrClient(org.apache.solr.client.solrj.SolrClient) SolrSearchServer(com.rbmhtechnology.vind.solr.backend.SolrSearchServer) FulltextSearch(com.rbmhtechnology.vind.api.query.FulltextSearch) SolrQuery(org.apache.solr.client.solrj.SolrQuery) Test(org.junit.Test)

Example 10 with DocumentFactory

use of com.rbmhtechnology.vind.model.DocumentFactory in project vind by RBMHTechnology.

the class SolrSearchServerTest method testExecute.

@Test
public void testExecute() throws Exception {
    Asset asset = new Asset();
    // FIXME: Asset has no @Id field
    server.indexBean(asset);
    // query
    BeanSearchResult<Asset> result = server.execute(Search.fulltext("hello world").filter(eq("category", "test")), Asset.class);
    // suggestion
    SuggestionResult suggestions = server.execute(Search.suggest("he").fields("category"), Asset.class);
    FieldDescriptor<String> title = new FieldDescriptorBuilder().setBoost(2).setLanguage(Language.German).buildTextField("title");
    // complex
    DocumentFactory factory = new DocumentFactoryBuilder("asset").addField(title).build();
    Document document = factory.createDoc("1234");
    server.index(document);
    // suggestion
    SuggestionResult suggestionsFromFactory = server.execute(Search.suggest("he").fields("title"), factory);
}
Also used : DocumentFactory(com.rbmhtechnology.vind.model.DocumentFactory) SuggestionResult(com.rbmhtechnology.vind.api.result.SuggestionResult) Asset(com.rbmhtechnology.vind.solr.backend.utils.Asset) Document(com.rbmhtechnology.vind.api.Document) FieldDescriptorBuilder(com.rbmhtechnology.vind.model.FieldDescriptorBuilder) DocumentFactoryBuilder(com.rbmhtechnology.vind.model.DocumentFactoryBuilder) Test(org.junit.Test)

Aggregations

DocumentFactory (com.rbmhtechnology.vind.model.DocumentFactory)15 SolrQuery (org.apache.solr.client.solrj.SolrQuery)8 Document (com.rbmhtechnology.vind.api.Document)7 SolrClient (org.apache.solr.client.solrj.SolrClient)6 Test (org.junit.Test)6 SearchServer (com.rbmhtechnology.vind.api.SearchServer)5 ExecutableSuggestionSearch (com.rbmhtechnology.vind.api.query.suggestion.ExecutableSuggestionSearch)5 FieldDescriptor (com.rbmhtechnology.vind.model.FieldDescriptor)5 Resources (com.google.common.io.Resources)4 SearchServerException (com.rbmhtechnology.vind.SearchServerException)4 AnnotationUtil (com.rbmhtechnology.vind.annotations.AnnotationUtil)4 ServiceProvider (com.rbmhtechnology.vind.api.ServiceProvider)4 com.rbmhtechnology.vind.api.query (com.rbmhtechnology.vind.api.query)4 Delete (com.rbmhtechnology.vind.api.query.delete.Delete)4 Page (com.rbmhtechnology.vind.api.query.division.Page)4 Slice (com.rbmhtechnology.vind.api.query.division.Slice)4 Facet (com.rbmhtechnology.vind.api.query.facet.Facet)4 Interval (com.rbmhtechnology.vind.api.query.facet.Interval)4 RealTimeGet (com.rbmhtechnology.vind.api.query.get.RealTimeGet)4 DescriptorSuggestionSearch (com.rbmhtechnology.vind.api.query.suggestion.DescriptorSuggestionSearch)4