You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by jmsm <jt...@gmail.com> on 2009/11/26 16:44:55 UTC

Intensive querying give odd results in search

Hi, All.

I have a problem regarding intensive query requesting.
I'm using SolrJ client through http in the client side and Solr 1.4 and
tomcat 6.0.20 on the server side.

My purpose is to execute 3 different queries for each word in a list of
words and get the number of results. 

On the client
**********
String queryText = "titexpl:NASA";

SolrServer server = ServerConSearch.getInstance().getServer();
SolrQuery query = new SolrQuery();
query.setQuery(queryText);
query.addField("*");
query.addField("score");
query.setRows(0);
QueryResponse rsp = server.query(query);
final long resultsNum = rsp.getResults().getNumFound();


My problem is that I get different results for the same query. For example,
if I search "titexpl:NASA" I get 10 results for the first time but after
some tries I get 0 results. After more tries, I get 10 results again an so
on.

I tried with Tomcat running on Windows Vista and Ubuntu (in VMWare) but
always got the same problem. Also used the default Jetty that cames with
Solr, but no luck.


Any thoughts?

Ze Marques


PS: No index update is being done during the queries.
PS 2: Adding a sleep of 50ms for each query request, seems to solve the
problem. 



-- 
View this message in context: http://old.nabble.com/Intensive-querying-give-odd-results-in-search-tp26531166p26531166.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Intensive querying give odd results in search

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Thu, Nov 26, 2009 at 9:14 PM, jmsm <jt...@gmail.com> wrote:

>
> Hi, All.
>
> I have a problem regarding intensive query requesting.
> I'm using SolrJ client through http in the client side and Solr 1.4 and
> tomcat 6.0.20 on the server side.
>
> My purpose is to execute 3 different queries for each word in a list of
> words and get the number of results.
>
> On the client
> **********
> String queryText = "titexpl:NASA";
>
> SolrServer server = ServerConSearch.getInstance().getServer();
> SolrQuery query = new SolrQuery();
> query.setQuery(queryText);
> query.addField("*");
> query.addField("score");
> query.setRows(0);
> QueryResponse rsp = server.query(query);
> final long resultsNum = rsp.getResults().getNumFound();
>
>
> My problem is that I get different results for the same query. For example,
> if I search "titexpl:NASA" I get 10 results for the first time but after
> some tries I get 0 results. After more tries, I get 10 results again an so
> on.
>
> I tried with Tomcat running on Windows Vista and Ubuntu (in VMWare) but
> always got the same problem. Also used the default Jetty that cames with
> Solr, but no luck.
>
>
> Any thoughts?
>
> Ze Marques
>
>
> PS: No index update is being done during the queries.
> PS 2: Adding a sleep of 50ms for each query request, seems to solve the
> problem.
>
>
That is very strange. Is it possible that errors during search are getting
counted as 0 results in your program?

If you can isolate the problem into a repeatable test case, we can try to
figure out what is wrong. I haven't yet seen this issue elsewhere.

-- 
Regards,
Shalin Shekhar Mangar.