On Jan 19, 2007, at 9:59 PM, Erik Hatcher wrote:
I think a standalone request handler to return all the field names in the index would be great. Anything this thing should return other than a list of field names? I think this should be standalone because it is separate from a search, and in my use case it would be something solrb would load up once (per connection to Solr perhaps) and use to dynamically show what can be faceted on, sorted on, searched on, etc. Combine that with a fetch of schema.xml, and a client would have a pretty good picture of what is under the covers. Maybe the request handler that returns the field names could also combine that with the schema information, flattened a bit.

I just created a very simple StructureRequestHandler:

        <https://issues.apache.org/jira/browse/SOLR-116>

For the request http://localhost:8983/solr/select/? qt=structure&wt=ruby on the example index, it returns this:

{'responseHeader'=>{'status'=>0,'QTime'=>2},'fields'=> {'includes'=>'text','cat'=>'text_ws','alphaNameSort'=>'alphaOnlySort','i d'=>'string','text'=>'text','manu_exact'=>'string','features'=>'text','p rice'=>'sfloat','incubationdate_dt'=>'date','timestamp'=>'date','sku'=>' textTight','name'=>'text','nameSort'=>'string','manu'=>'text','weight'=> 'sfloat','inStock'=>'boolean','popularity'=>'sint'}}

(the example pasted into the JIRA issue was from an older version of the example index; I just refreshed it from the trunk .xml files for this message). In this example, the one field you'd not get by reading schema.xml is incubationdate_dt.

Suggestions for improvement?

I'll be happy to document and commit when given the thumbs up.

        Erik

Reply via email to