本文整理了Java中com.algolia.search.saas.Query.setFacets
方法的一些代码示例,展示了Query.setFacets
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setFacets
方法的具体详情如下:
包路径:com.algolia.search.saas.Query
类名称:Query
方法名:setFacets
[英]List of object attributes that you want to use for faceting.
Only attributes that have been added in attributesForFaceting index setting can be used in this parameter. You can also use *
to perform faceting on all attributes specified in attributesForFaceting.
[中]要用于镶嵌面的对象属性列表。
此参数中只能使用attributesForFaceting索引设置中添加的属性。您还可以使用“*”对attributesForFaceting中指定的所有属性执行面处理。
代码示例来源:origin: algolia/instantsearch-android
private Searcher rebuildQueryFacets() {
final String[] facetArray = this.facets.toArray(new String[0]);
query.setFacets(facetArray);
return this;
}
代码示例来源:origin: algolia/algoliasearch-client-java
queries.add(new IndexQuery(this.indexName, new Query(query).setHitsPerPage(0).enableAnalytics(false).setAttributesToRetrieve(new ArrayList<String>()).setAttributesToHighlight(new ArrayList<String>()).setAttributesToSnippet(new ArrayList<String>()).setFacets(facets).setFacetFilters(filters.toString())));
代码示例来源:origin: algolia/algoliasearch-client-android
.setFacets(facets).setFacetFilters(facetFilters));
代码示例来源:origin: algolia/algoliasearch-client-android
index.waitTask(task.getString("taskID"));
final Query query = new Query("phone").setFacets("brand", "category", "stars");
final List<String> disjunctiveFacets = Collections.singletonList("brand");
final Map<String, List<String>> refinements = new HashMap<>();
代码示例来源:origin: algolia/algoliasearch-client-android
final Query query = new Query("h").setFacets("city");
final List<String> disjunctiveFacets = Arrays.asList("stars", "facilities");
final Map<String, List<String>> refinements = new HashMap<>();
代码示例来源:origin: algolia/algoliasearch-client-android
@Test
public void facets() {
Query query = new Query();
assertNull(query.getFacets());
query.setFacets("foo", "bar");
assertArrayEquals(new String[]{"foo", "bar"}, query.getFacets());
assertEquals("[\"foo\",\"bar\"]", query.get("facets"));
Query query2 = Query.parse(query.build());
assertArrayEquals(query.getFacets(), query2.getFacets());
}
内容来源于网络,如有侵权,请联系作者删除!