nisbos


非分页查询

<p><strong>简要描述:</strong> </p> <ul> <li>非分页查询</li> </ul> <p><strong>入参:</strong> </p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">queryBuilder</td> <td style="text-align: left;">是</td> <td style="text-align: left;">QueryBuilder</td> <td>要查询的条件</td> </tr> <tr> <td style="text-align: left;">clazz</td> <td style="text-align: left;">是</td> <td style="text-align: left;">Class<T></td> <td>要查询的条件</td> </tr> </tbody> </table> <p><strong>返回示例</strong></p> <pre><code> { "11111", "22222" }</code></pre> <p><strong>返回参数说明</strong> </p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">无</td> <td style="text-align: left;">Class<T></td> <td>查询出来的数据</td> </tr> </tbody> </table> <p><strong>示例代码</strong></p> <pre><code class="language-java">List&lt;UserModel&gt; userModels = elasticsearchTemplate.search(QueryBuilders.matchQuery("username","li"),UserModel.class); if(!CollectionUtils.isEmpty(userModels)){ userModels.forEach(userModel -&gt; { System.out.println(userModel); }); }</code></pre> <p><strong>接口</strong></p> <pre><code class="language-java">/** * 非分页查询(跨索引) * 目前暂时传入类类型 * @param queryBuilder * @param clazz * @return * @throws Exception */ public List&lt;T&gt; search(QueryBuilder queryBuilder, Class&lt;T&gt; clazz,String... indexs) throws Exception;</code></pre>

页面列表

ITEM_HTML