lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Wolanin (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (SOLR-2168) Velocity facet output for facet missing
Date Sun, 17 Oct 2010 14:27:22 GMT

    [ https://issues.apache.org/jira/browse/SOLR-2168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921852#action_12921852
] 

Peter Wolanin edited comment on SOLR-2168 at 10/17/10 10:25 AM:
----------------------------------------------------------------

Those all sound like good changes.

In terms of templating -I'd find something like erb, or PHP, or jsp much easier, and I imagine
many more people are failiar with those.  So far, I feel like it's hard to understand in velocity
how variables and control structures are distinguished from the output, and it's not clear
that it's a real template in terms of the way e.g. white space is handled or not.  This is
especially true in the case of macro output, where is seems like e.g. the carriage returns
and spaces I'd naturally include in control structures to make them readable become part of
the output.

The variable handling is also weird, that I need to use #set() for actual assignment?

In terms of readablilty, loo for example, at this bit:
{code}
<li><a href="#url_for_home#lens&fq=$esc.url(
{code}

the &fq= is output in the middle of a series of macro and function calls but nothing visually
distinguishes them.  Can I define new functions instead of macros?  If a macro call could
be written as #{url_for_home} it would provide more visual separation. 

I notice in the patch you have:
{code}
"-${field.name}:[* TO *]"
{code}

Looks like the function call can be written like this?
{code}
${esc.url("-${field.name}:[* TO *]")}
{code}


      was (Author: pwolanin):
    
Those all sound like good changes.

In terms of templating -I'd find something like erb, or PHP, or jsp much easier, and I imagine
many more people are failiar with those.  So far, I feel like it's hard to understand in velocity
how variables and control structures are distinguished from the output, and it's not clear
that it's a real template in terms of the way e.g. white space is handled or not.  This is
especially try in the case of macro output, where is seems like e.g. the carriae returns and
spaces I'd naturally include in control structures to make them readable become part of the
output.

The variable handling is also weird, that I need to use #set() for actual assignment?

In terms of readablilty, loo for example, at this bit:
{code}
<li><a href="#url_for_home#lens&fq=$esc.url(
{code}

the &fq= is output in the middle of a series of macro and function calls but nothing visually
distinguishes them.  Can I define new functions instead of macros?  If a macro call could
be written as #{url_for_home} it would provide more visual separation. 

I notice in the patch you have:
{code}
"-${field.name}:[* TO *]"
{code}

Looks like the function call can be written like this?
{code}
${esc.url("-${field.name}:[* TO *]")}
{code}

  
> Velocity facet output for facet missing
> ---------------------------------------
>
>                 Key: SOLR-2168
>                 URL: https://issues.apache.org/jira/browse/SOLR-2168
>             Project: Solr
>          Issue Type: Bug
>          Components: Response Writers
>    Affects Versions: 3.1
>            Reporter: Peter Wolanin
>            Priority: Minor
>         Attachments: SOLR-2168.patch
>
>
> If I add fact.missing to the facet params for a field, the Veolcity output has in the
facet list:
> $facet.name (9220)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message