You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Otis Gospodnetic (JIRA)" <ji...@apache.org> on 2008/06/02 23:09:45 UTC

[jira] Commented: (SOLR-502) Add search time out support

    [ https://issues.apache.org/jira/browse/SOLR-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601761#action_12601761 ] 

Otis Gospodnetic commented on SOLR-502:
---------------------------------------

I finally had the chance to apply this locally and try it out.  I have not been able to get this time out business to kick in, though.  Here is what I did so far, after applying the patch, and clean dist and deployment of solr war.

I set up 2 Solr instances (actually 1 Jetty with 2 Solr homes defined via JNDI).  Identical schema, each index with 100K docs.

I then hit one of the instances, specifying both shards and asked for q=title:a* (expensive query), while using timeAllowed=1, like this:

{code}
curl --silent 'http://localhost:8080/solr1/select/?q=title%3Aa*&version=2.2&start=0&rows=1000&indent=on&shards=localhost:8080/solr1,localhost:8080/solr2&timeAllowed=1' | less
{code}

....Aaaarg, I see one problem.  That "timeAllowed" is specified as "timeallowed":

{code}
[otis@localhost SOLR-502]$ grep TIME_ALLOW SOLR-502.patch  | head -1
+  public static final String TIME_ALLOWED = "timeallowed";
{code}

Sean, I think this should be camelCase, too.

OK, so changing that:

{code}
curl --silent 'http://localhost:8080/solr1/select/?q=title%3Aa*&version=2.2&start=0&rows=1000&indent=on&shards=localhost:8080/solr1,localhost:8080/solr2&timeallowed=1' | less
{code}

However, I am *still* unable to get the timeout to happen.  I see QTime of 257 in the response, clearly above timeallowed=1.  If timeallowed=1, should I ever be seeing QTime over 1?

{code:xml}
<lst name="responseHeader">
 <int name="status">0</int>
 <int name="QTime">257</int>
 <lst name="params">
  <str name="shards">localhost:8080/solr1,localhost:8080/solr2</str>
  <str name="indent">on</str>
  <str name="start">0</str>
  <str name="q">title:a*</str>
  <str name="timeallowed">1</str>
  <str name="version">2.2</str>
  <str name="rows">10</str>
 </lst>
</lst>
<result name="response" numFound="50936" start="0">
{code}

I also grepped the output for "partial" and never find anything.  Am I doing something wrong?
I also see the latest SOLR-502.patch still has some print statements, so I looked at stdout, but nothing is getting printed there.

I'll see if I can trace this, but if I did something wrong or see a bug in your code, I'm all eyes.


> Add search time out support
> ---------------------------
>
>                 Key: SOLR-502
>                 URL: https://issues.apache.org/jira/browse/SOLR-502
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Sean Timm
>            Assignee: Otis Gospodnetic
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-502.patch, SOLR-502.patch, solrTimeout.patch, solrTimeout.patch, solrTimeout.patch, solrTimeout.patch, solrTimeout.patch
>
>
> Uses LUCENE-997 to add time out support to Solr.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.