lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl <jan....@cominvent.com>
Subject Re: [jira] [Commented] (SOLR-2417) Allow explain info directly to response documents
Date Tue, 29 Mar 2011 14:56:51 GMT
I'd prefer plain field names, even for "pseudo fields", in same way as "score".

Then do the config of what a pseudo field means outside of fl=

Example concept:
&fl=title,explain
&transformer.explain.field=explain
&f.explain.transformer.explain.type=text

&fl=title,myhltitle
&f.title.transformer.hl.field=myhltitle

This will give a 1:1 between what you ask for in fl and what you get in the result. End user
only need to relate to plain names configured by the search admin and set as defaults in solrconfig.xml
requesthandlers. This gives a nice logical separation of roles in a search project as well.
I as search engineer set all the defaults, the API users select from a list of pseudo fields
I have told them to use, and is happily ignorant of the implementation, or even whether it's
a real field or a pseudo field.

Other usecase is  distance:
&fl=title,mydistance

...will give the distance from a geospatial calculation in the mydistance field. API users
would treat it exactly the same as an ordinary field.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

On 29. mars 2011, at 16.30, Yonik Seeley wrote:

> On Tue, Mar 29, 2011 at 10:20 AM, Ryan McKinley <ryantxu@gmail.com> wrote:
>>>> 
>>>> Another key example would be inline highlighting:
>>>> 
>>>> &id,_hl:title_,body
>>> 
>>> If we're going to come up with another syntax, it needs to be fully fleshed out.
>>> This one already looks ambiguous in the context of "fl".
>>> 
>>> For example, does that mean give me "id","title highlighted","body"
>>> or does it mean "id","title and body highlighted"?
>>> 
>> 
>> To get title and body highlighted, you would have:
>> &fl=id,_hl:title_,_hl:body_
>> In general, an fl value that starts and ends with _ tries to call a transformer.
> 
> Oh, so the underscores are the delimiters themselves?
> id,_hl:title_,_hl:body_
> 
> Whew... I dunno.  That definitely wasn't obvious when I first looked
> at it, due to underscore normally being part of an id.
> What about named parameters (like say number of fragments or whatever)?
> 
> -Yonik
> http://www.lucenerevolution.org -- Lucene/Solr User Conference, May
> 25-26, San Francisco
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message