lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McKinley <ryan...@gmail.com>
Subject Re: Luke request handler issue
Date Wed, 23 May 2007 17:02:08 GMT
Yonik Seeley wrote:
> On 5/23/07, Ryan McKinley <ryantxu@gmail.com> wrote:
>> > If someone wants to retrieve *all* of the terms in a specific field,
>> > it doesn't seem like they should have to get all of the terms in all
>> > other fields too, right?
>> >
>>
>> As implemented, you get the top terms for all the fields you ask for.
>> By default this is all of them.  If you specify a field (with fl=xxx)
>> you only get that field's top terms:
>>   http://localhost:8983/solr/admin/luke?fl=text&numTerms=1000
>>
>> It may be useful to want 10 terms from field 'A' and 100 for field 'B',
>> but for now, that should probably be done with faceting.
>>
>> Faceting returns readable values (from the schema) while Luke deals with
>> the raw lucene index.
> 
> Ah, yes... I see both as being useful.
> If solr does know about the fieldType, should the default be to use
> the external (human readable) values?
> 

Thats how it currently works:

   NamedList<Integer> list = new NamedList<Integer>();
   for (TermInfo i : aslist) {
     String txt = i.term.text();
     SchemaField ft = schema.getFieldOrNull( i.term.field() );
     if( ft != null ) {
       txt = ft.getType().indexedToReadable( txt );
     }
     list.add( txt, i.docFreq );
   }
   return list;

When you inspect a single document, it returns both.

ryan

Mime
View raw message