List Info

Thread: Re: svn commit: r507825 - /lucene/solr/trunk/src/java/org/apache/solr/handler/IndexInfoRequestHandle




Re: svn commit: r507825 - /lucene/solr/trunk/src/java/org/apache/s olr/handler/IndexInfoRequestHandle
country flaguser name
United States
2007-02-14 23:50:27
Any objections?

CC'ing ruby-dev:

The error I get is this:
$ irb
irb(main):002:0> YAML.load YAML.dump(1171485783523)
TypeError: allocator undefined for Bignum
         from /opt/local/lib/ruby/1.8/yaml.rb:133:in
`transfer'
         from /opt/local/lib/ruby/1.8/yaml.rb:133:in `load'
         from (irb):2

Where does YAML come into play?  Well, I serialize out the
response  
obtained from IndexInfoRequestHandler as a .yml file but
could not  
load it back with the error just shown.  (for stats
gathering as I  
load the library data: 200k documents indexed, hideous
facets data,  
Solr rocking big time, 108ms response time returning the top
20 of  
each facet).

	Erik




On Feb 15, 2007, at 12:33 AM, ehatcherapache.org wrote:

> Author: ehatcher
> Date: Wed Feb 14 21:33:11 2007
> New Revision: 507825
>
> URL: 
http://svn.apache.org/viewvc?view=rev&rev=507825
> Log:
> Adjust Lucene version value to be a String rather than
an numeric.   
> I found a case with Ruby where the numeric
> was too big to laod when serialiized to a YAML file
(maybe this is  
> an edge case?).  It is unlikely that a client
> needs to use this as a numeric anyway, but rather as a
comparison  
> against later calls to the IndexInfoRequestHandler.
>
>
>
> Modified:
>     lucene/solr/trunk/src/java/org/apache/solr/handler/

> IndexInfoRequestHandler.java
>
> Modified:
lucene/solr/trunk/src/java/org/apache/solr/handler/ 
> IndexInfoRequestHandler.java
> URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/j
ava/org/ 
> apache/solr/handler/IndexInfoRequestHandler.java? 
> view=diff&rev=507825&r1=507824&r2=507825
>
============================================================
========== 
> ========
> --- lucene/solr/trunk/src/java/org/apache/solr/handler/

> IndexInfoRequestHandler.java (original)
> +++ lucene/solr/trunk/src/java/org/apache/solr/handler/

> IndexInfoRequestHandler.java Wed Feb 14 21:33:11 2007
>  -58,10 +58,10 
>        }
>        rsp.add("fields", fields);
>
> -      Map<String,Number> indexInfo = new
HashMap<String,Number>();
> +      Map<String,Object> indexInfo = new
HashMap<String,Object>();
>        indexInfo.put("numDocs",
reader.numDocs());
>        indexInfo.put("maxDoc",
reader.maxDoc());
> -      indexInfo.put("version",
reader.getVersion());
> +      indexInfo.put("version",
Long.toString(reader.getVersion()));
>        // indexInfo.put("age", );  //
computed from  
> SolrIndexSearcher.openedAt?
>
>        rsp.add("index", indexInfo);
>


Re: svn commit: r507825 - /lucene/solr/trunk/src/java/org/apache/s olr/handler/IndexInfoRequestHandle
user name
2007-02-15 13:41:19
On 2/15/07, Erik Hatcher <erikehatchersolutions.com>
wrote:
> Any objections?

Nope, version being a string sounds fine... as you say, it's
only used
for comparison.
"age" or "openedAt" if expressed in
milliseconds should be numberics
though... is this a YAML bug?

-Yonik

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )