Weird faceted browser behavior with multivalue fields

View: New views
4 Messages — Rating Filter:   Alert me  

Weird faceted browser behavior with multivalue fields

by Victor Oomens-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

When adding a multi value field value to the filter list, the value will
still be listed as an option. Check out
http://cocoondev.org/main/facetedBrowser/default.
In this demo, click on the daisy collection. Here you'll see that you
can add an unlimited amount of daisy collection filters.

Second, when working with multi value hierarchy fields, filters are not
'added', but overrule each other.

Is this by design or is this a bug?

Victor.
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Weird faceted browser behavior with multivalue fields

by Karel Vervaeke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This was fixed in Daisy 2.3. It wasn't really a bug, rather a feature
that wasn't implemented ;-)

On Fri, Jun 26, 2009 at 2:51 PM, Victor Oomens<victor@...> wrote:

> Hi,
>
> When adding a multi value field value to the filter list, the value will
> still be listed as an option. Check out
> http://cocoondev.org/main/facetedBrowser/default.
> In this demo, click on the daisy collection. Here you'll see that you can
> add an unlimited amount of daisy collection filters.
>
> Second, when working with multi value hierarchy fields, filters are not
> 'added', but overrule each other.
>
> Is this by design or is this a bug?
>
> Victor.
> _______________________________________________
> daisy community mailing list
> Professional Daisy support:
> http://outerthought.org/en/services/daisy/support.html
> mail to: daisy@...
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
>
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Weird faceted browser behavior with multivalue fields

by Victor Oomens :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've tested this in 2.3, but it still doesn't work as I would expect.

Testcase:

Suppose you have a documenttype with a multi value hierarchy field and this field is configured as facet. Now you can filter on this field, super, but if you select TWO field values, only ONE will show up in the underlying query.

A normal multi value field works OK, I've noticed a 'has all' in the query result.


Karel Vervaeke schreef:
This was fixed in Daisy 2.3. It wasn't really a bug, rather a feature
that wasn't implemented ;-)

On Fri, Jun 26, 2009 at 2:51 PM, Victor Oomensvictor@... wrote:
  
Hi,

When adding a multi value field value to the filter list, the value will
still be listed as an option. Check out
http://cocoondev.org/main/facetedBrowser/default.
In this demo, click on the daisy collection. Here you'll see that you can
add an unlimited amount of daisy collection filters.

Second, when working with multi value hierarchy fields, filters are not
'added', but overrule each other.

Is this by design or is this a bug?

Victor.
_______________________________________________
daisy community mailing list
Professional Daisy support:
http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

    
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

  

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: Weird faceted browser behavior with multivalue fields

by Victor Oomens :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Possible fix:

In FacetedBrowserApple.java:

In Method filtersToConditions, remove HAS_PATH condition.

In Condition.toString(), replace code with:

            if (values != null && !operator.equals(Operator.HAS_PATH)) {
                StringBuilder result = new StringBuilder();
                result.append(identifier);
                result.append(" has all(");               
                for (int i = 0; i < values.size(); i++) {
                    if (i > 0)
                        result.append(", ");
                    result.append(values.get(i));
                }
                result.append(")");
                return result.toString();
            } else if (values != null) {
                StringBuilder result = new StringBuilder();
                result.append("(");
                for (int i = 0; i < values.size(); i++) {
                    if (i > 0)
                        result.append(" AND ");               
                    result.append("(").append(identifier).append(" ").append(operator.getSyntax()).append(" ").append(values.get(i)).append(")");
                }
                result.append(")");
                return result.toString();
            } else {
                return identifier + " " + operator.getSyntax() + " " + value;
            }




Victor Oomens schreef:
Hi,

I've tested this in 2.3, but it still doesn't work as I would expect.

Testcase:

Suppose you have a documenttype with a multi value hierarchy field and this field is configured as facet. Now you can filter on this field, super, but if you select TWO field values, only ONE will show up in the underlying query.

A normal multi value field works OK, I've noticed a 'has all' in the query result.


Karel Vervaeke schreef:
This was fixed in Daisy 2.3. It wasn't really a bug, rather a feature
that wasn't implemented ;-)

On Fri, Jun 26, 2009 at 2:51 PM, Victor Oomensvictor@... wrote:
  
Hi,

When adding a multi value field value to the filter list, the value will
still be listed as an option. Check out
http://cocoondev.org/main/facetedBrowser/default.
In this demo, click on the daisy collection. Here you'll see that you can
add an unlimited amount of daisy collection filters.

Second, when working with multi value hierarchy fields, filters are not
'added', but overrule each other.

Is this by design or is this a bug?

Victor.
_______________________________________________
daisy community mailing list
Professional Daisy support:
http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

    
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

  

_______________________________________________ daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy