Re: timeAllowed flag in the response
Please file a JIRA. And a patch if you are so inclined. On Fri, Jun 8, 2012 at 4:55 AM, Michael Kuhlmann wrote: > Am 08.06.2012 11:55, schrieb Laurent Vaills: > >> Hi Michael, >> >> Thanks for the details that helped me to take a deeper look in the source >> code. I noticed that each time a TimeExceededException is caught the >> method >> setPartialResults(true) is called...which seems to be what I'm looking >> for. >> I have to investigate, since this partialResults does not seem to be set >> for the sharded queries. > > > Ah, I simply was too blind! ;) The partial results flag indeed is set in the > response header. > > Then I think this is a bug that it's not filled in a sharded response, or it > simply is not there when sharding. > > Greeting, > Kuli -- Lance Norskog goks...@gmail.com
Re: timeAllowed flag in the response
Am 08.06.2012 11:55, schrieb Laurent Vaills: Hi Michael, Thanks for the details that helped me to take a deeper look in the source code. I noticed that each time a TimeExceededException is caught the method setPartialResults(true) is called...which seems to be what I'm looking for. I have to investigate, since this partialResults does not seem to be set for the sharded queries. Ah, I simply was too blind! ;) The partial results flag indeed is set in the response header. Then I think this is a bug that it's not filled in a sharded response, or it simply is not there when sharding. Greeting, Kuli
Re: timeAllowed flag in the response
Hi Michael, Thanks for the details that helped me to take a deeper look in the source code. I noticed that each time a TimeExceededException is caught the method setPartialResults(true) is called...which seems to be what I'm looking for. I have to investigate, since this partialResults does not seem to be set for the sharded queries. Regards, Laurent Maybe there is a way to write a not so dirty patch with a new . 2012/6/8 Michael Kuhlmann > Hi Laurent, > > alas there is currently no such option. The time limit is handled by an > internal TimeLimitingCollector, which is used inside SolrIndexSearcher. > Since the using method only returns the DocList and doesn't have access to > the QueryResult, it won't be easy to return this information in a beautiful > way. > > Aborted Queries don't feed the caches, so you maybe can check whether the > cache fill rate has changed, Of course, this is no reasonable approach in > production environment. > > The only way you can get the information is by patching Solr with a dirty > hack. > > Greetings, > Kuli > > Am 07.06.2012 22:14, schrieb Laurent Vaills: > > Hi everyone, >> >> We have some grouping queries that are quite long to execute. Some are too >> long to execute and are not acceptable. We have setup timeout for the >> socket but with this we get no result and the query is still running on >> the >> Solr side. >> So, we are now using the timeAllowed parameter which is a good compromise. >> However, in the response, how can we know that the query was "stopped" >> because it was too long ? >> >> I need this information for monitoring and to tell the user that the >> results are not complete. >> >> Regards, >> Laurent >> >> >
Re: timeAllowed flag in the response
Hi Laurent, alas there is currently no such option. The time limit is handled by an internal TimeLimitingCollector, which is used inside SolrIndexSearcher. Since the using method only returns the DocList and doesn't have access to the QueryResult, it won't be easy to return this information in a beautiful way. Aborted Queries don't feed the caches, so you maybe can check whether the cache fill rate has changed, Of course, this is no reasonable approach in production environment. The only way you can get the information is by patching Solr with a dirty hack. Greetings, Kuli Am 07.06.2012 22:14, schrieb Laurent Vaills: Hi everyone, We have some grouping queries that are quite long to execute. Some are too long to execute and are not acceptable. We have setup timeout for the socket but with this we get no result and the query is still running on the Solr side. So, we are now using the timeAllowed parameter which is a good compromise. However, in the response, how can we know that the query was "stopped" because it was too long ? I need this information for monitoring and to tell the user that the results are not complete. Regards, Laurent
Re: timeAllowed flag in the response
Are you requesting a large number of rows? If so, request smaller chunks, like ten at a time. Then you can show those with a "waiting" note. wunder On Jun 7, 2012, at 1:14 PM, Laurent Vaills wrote: > Hi everyone, > > We have some grouping queries that are quite long to execute. Some are too > long to execute and are not acceptable. We have setup timeout for the > socket but with this we get no result and the query is still running on the > Solr side. > So, we are now using the timeAllowed parameter which is a good compromise. > However, in the response, how can we know that the query was "stopped" > because it was too long ? > > I need this information for monitoring and to tell the user that the > results are not complete. > > Regards, > Laurent