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 Richard Wiseman <rw...@infosciences.com> on 2009/04/10 17:58:05 UTC

Index Version Number

Is it possible for a Solr client to determine if the index has changed 
since the last time it performed a query?  For example, is it possible 
to query the current Lucene indexVersion?

Thanks in advance for your help,
Richard

Re: Index Version Number

Posted by Richard Wiseman <rw...@infosciences.com>.
Interesting.  Do you know if it's possible to get the HTTP headers with 
Solrj?

Yonik Seeley wrote:
> On Fri, Apr 10, 2009 at 11:58 AM, Richard Wiseman
> <rw...@infosciences.com> wrote:
>   
>> Is it possible for a Solr client to determine if the index has changed since
>> the last time it performed a query?  For example, is it possible to query
>> the current Lucene indexVersion?
>>     
>
> Grant pointed to one way - the Luke handler.
> Another way is to look at the Last-Modified or ETag HTTP headers.
>
> $ curl -i http://localhost:8983/solr/select?q=solr
> HTTP/1.1 200 OK
> Last-Modified: Fri, 10 Apr 2009 17:40:54 GMT
> ETag: "OWZlNjdkN2Q4ODAwMDAwU29scg=="
> Content-Type: text/xml; charset=utf-8
> Content-Length: 2308
> Server: Jetty(6.1.3)
>
>
> -Yonik
> http://www.lucidimagination.com
>
>
>   


-- 
Richard Wiseman
Information Sciences Corp.
(301) 962-5707


Re: Index Version Number

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Fri, Apr 10, 2009 at 11:58 AM, Richard Wiseman
<rw...@infosciences.com> wrote:
> Is it possible for a Solr client to determine if the index has changed since
> the last time it performed a query?  For example, is it possible to query
> the current Lucene indexVersion?

Grant pointed to one way - the Luke handler.
Another way is to look at the Last-Modified or ETag HTTP headers.

$ curl -i http://localhost:8983/solr/select?q=solr
HTTP/1.1 200 OK
Last-Modified: Fri, 10 Apr 2009 17:40:54 GMT
ETag: "OWZlNjdkN2Q4ODAwMDAwU29scg=="
Content-Type: text/xml; charset=utf-8
Content-Length: 2308
Server: Jetty(6.1.3)


-Yonik
http://www.lucidimagination.com

Re: Index Version Number

Posted by Grant Ingersoll <gs...@apache.org>.
This info is available via the Luke Handler, I believe: http://localhost:8983/solr/admin/luke/ 
:  In there, I see: version, current, optimized and true information.

See also http://wiki.apache.org/solr/LukeRequestHandler

HTH,
Grant

On Apr 10, 2009, at 11:58 AM, Richard Wiseman wrote:

> Is it possible for a Solr client to determine if the index has  
> changed since the last time it performed a query?  For example, is  
> it possible to query the current Lucene indexVersion?
>
> Thanks in advance for your help,
> Richard

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search