在Solr Cassandra搜索中只有10行 [英] Getting only 10 rows in Solr Cassandra search

查看:376
本文介绍了在Solr Cassandra搜索中只有10行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Datastax Cassandra和Apache Solr进行多个部分搜索。
问题是,每次我只得到10行,即使一次我做count(*)查询,我能够检查有1300行属于特定查询。

  nandan @ cqlsh:testo> select emp from empo where solr_query ='isd:9 *'; 

id
------------------------------------- -
5ee5fca6-6f48-11e6-8b77-86f30ca893d3
27e3e3bc-6f48-11e6-8b77-86f30ca893d3
f3156e76-6f47-11e6-8b77-86f30ca893d3
f315ac74-6f47-11e6- 8b77-86f30ca893d3
f315bc82-6f47-11e6-8b77-86f30ca893d3
27e3058c-6f48-11e6-8b77-86f30ca893d3
4016eee4-6f47-11e6-8b77-86f30ca893d3
1bd33e34-6f47- 11e6-8b77-86f30ca893d3
8f0a9168-6f47-11e6-8b77-86f30ca893d3
6669cc42-6f47-11e6-8b77-86f30ca893d3

(10行)

搜索几个链接后,我对solrconfig.xml文件进行了更改。并且变化如下。

 < requestHandler class =solr.SearchHandlerdefault =truename =search> 
<! - 可以指定查询参数的默认值,这些
将被请求中的参数覆盖
- >
< lst name =defaults>
< int name =rows> 1000000< / int>
< / lst>
<! - SearchHandler for CQL Solr查询:
此处理程序不支持任何其他组件,只有默认参数
- >

< requestHandler class =com.datastax.bdp.search.solr.handler.component.CqlSearchHandlername =solr_query>
< lst name =defaults>
< int name =rows> 1000000< / int>
< / lst>
< / requestHandler>

但是我仍然遇到同样的问题。请让我知道什么是这个的解决方案。
谢谢。

解决方案

试试这个

  select emp from empo where solr_query ='isd:9 *'limit 1300; 

这将给你所有的1300行,默认情况下solr限制行返回10。 p>

I am working on Datastax Cassandra with Apache Solr for multiple partial search. Issue is, everytime I am getting only 10 rows even once I am doing count(*) query, I am able to check there are 1300 rows belong to particular query.

nandan@cqlsh:testo> select id from empo where solr_query = 'isd:9*';

 id
--------------------------------------
 5ee5fca6-6f48-11e6-8b77-86f30ca893d3
 27e3e3bc-6f48-11e6-8b77-86f30ca893d3
 f3156e76-6f47-11e6-8b77-86f30ca893d3
 f315ac74-6f47-11e6-8b77-86f30ca893d3
 f315bc82-6f47-11e6-8b77-86f30ca893d3
 27e3058c-6f48-11e6-8b77-86f30ca893d3
 4016eee4-6f47-11e6-8b77-86f30ca893d3
 1bd33e34-6f47-11e6-8b77-86f30ca893d3
 8f0a9168-6f47-11e6-8b77-86f30ca893d3
 6669cc42-6f47-11e6-8b77-86f30ca893d3

(10 rows)

After searching few links, I make changes into solrconfig.xml file. and changes are as below.

<requestHandler class="solr.SearchHandler" default="true" name="search">
    <!-- default values for query parameters can be specified, these
         will be overridden by parameters in the request
      -->
     <lst name="defaults">
       <int name="rows">1000000</int>
     </lst>
 <!-- SearchHandler for CQL Solr queries:
    this handler doesn't support any additional components, only default parameters
    -->

  <requestHandler class="com.datastax.bdp.search.solr.handler.component.CqlSearchHandler" name="solr_query">
     <lst name="defaults">
       <int name="rows">1000000</int>
     </lst>
  </requestHandler>

But still I am getting same issue. Please let me know what will be the solution for this. Thanks.

解决方案

try this

select id from empo where solr_query = 'isd:9*' limit 1300;

this will give you all 1300 rows, by default solr limits the rows it return to 10.

这篇关于在Solr Cassandra搜索中只有10行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆