@Test public void createQuery_HIGHLIGHTING_FROM_FIELD() { when(criteriaTransformer.transformCriteria(any())).thenReturn("+firstHighlightFrom:word +secondHighlightFrom:word +keyword:word"); SolrQuery solrQuery = queryFactory.createQuery(new JudgmentCriteria(), null); assertEquals("+firstContent:word +firstContent:word +keyword:word", solrQuery.get(HighlightParams.Q)); }
@Override public SolrQuery createQuery(C criteria, Paging paging) { SolrQuery query = new SolrQuery(); String queryString = criteriaTransformer.transformCriteria(criteria); query.setQuery(queryString); applyPaging(query, paging); applySorting(query, paging); applyHighlighting(query); return query; }
SearchQueryFactoryImpl implements SearchQueryFactory<C> { @Override public SolrQuery createQuery(C criteria, Paging paging) { SolrQuery query = new SolrQuery(); String queryString = criteriaTransformer.transformCriteria(criteria); query.setQuery(queryString); applyPaging(query, paging); applySorting(query, paging); applyHighlighting(query); return query; } }
SearchQueryFactoryImpl implements SearchQueryFactory<C> { @Override public SolrQuery createQuery(C criteria, Paging paging) { SolrQuery query = new SolrQuery(); String queryString = criteriaTransformer.transformCriteria(criteria); query.setQuery(queryString); applyPaging(query, paging); applySorting(query, paging); applyHighlighting(query); return query; }  }
SearchQueryFactoryImpl implements SearchQueryFactory<C> { @Override public SolrQuery createQuery(C criteria, Paging paging) { SolrQuery query = new SolrQuery(); String queryString = criteriaTransformer.transformCriteria(criteria); query.setQuery(queryString); applyPaging(query, paging); applySorting(query, paging); applyHighlighting(query); return query; }  @Override SolrQuery createQuery(C criteria, Paging paging); void setCriteriaTransformer(CriteriaTransformer<C> criteriaTransformer); void setHighlightParams(HighlightingParams highlightParams); }
SearchQueryFactoryImpl implements SearchQueryFactory<C> { @Override public SolrQuery createQuery(C criteria, Paging paging) { SolrQuery query = new SolrQuery(); String queryString = criteriaTransformer.transformCriteria(criteria); query.setQuery(queryString); applyPaging(query, paging); applySorting(query, paging); applyHighlighting(query); return query; }  @Override SolrQuery createQuery(C criteria, Paging paging); void setCriteriaTransformer(CriteriaTransformer<C> criteriaTransformer); void setHighlightParams(HighlightingParams highlightParams);  }