本文整理了Java中com.algolia.search.saas.Query.setQuery
方法的一些代码示例,展示了Query.setQuery
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setQuery
方法的具体详情如下:
包路径:com.algolia.search.saas.Query
类名称:Query
方法名:setQuery
[英]Set the full text query
[中]设置全文查询
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Construct a query with the specified query text.
*
* @param query Query text.
*/
public Query(CharSequence query) {
setQuery(query);
}
代码示例来源:origin: algolia/instantsearch-android
/**
* Triggers a new search with the given text.
*
* @param query the text to search for.
*/
public void search(String query) {
final Query newQuery = searcher.getQuery().setQuery(query);
searcher.setQuery(newQuery).search();
}
代码示例来源:origin: algolia/instantsearch-android
public Searcher search(@Nullable final String queryString, @Nullable final Object origin) {
if (queryString != null) {
query.setQuery(queryString);
EventBus.getDefault().post(new QueryTextChangeEvent(queryString, origin == null ? this : origin));
代码示例来源:origin: algolia/algoliasearch-client-android
@Test
public void query() {
Query query = new Query();
assertNull(query.getQuery());
query.setQuery("supercalifragilisticexpialidocious");
assertEquals("supercalifragilisticexpialidocious", query.getQuery());
assertEquals("supercalifragilisticexpialidocious", query.get("query"));
assertEquals(query.getQuery(), Query.parse(query.build()).getQuery());
}
内容来源于网络,如有侵权,请联系作者删除!