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

Rudi Seitz commented on SOLR-16496:
-----------------------------------

Thanks for the feedback [~dsmiley] 

 

Here is the ref-guide example of how to exclude filters selectively while 
faceting:

{{q=mainquery&fq=status:public&fq=\{!tag=dt}doctype:pdf&facet=true&facet.field=\{!ex=dt}doctype}}

 

In the case of elevation, I agree, the same approach to tagging a filter would 
work nicely ({{{}fq=\{!tag=dt}doctype:pdf{}}}).

But do you have an opinion on how the QEC-specific parameter to exclude some 
tags should look?

 

In the case of faceting, the tags to exclude are specified via the local 
parameter ex, as in: {{facet.field=\{!ex=dt}doctype}}

 

In the case of elevation, I don't think there's an obvious query parameter to 
which a local parameter like ex could be attached. I also don't think "ex" is 
appropriate as a name for the parameter because, in the elevation scenario, the 
filters won't be "excluded" or "bypassed" entirely but rather 
updated/modified/broadened to include the elevated documents.

 

What do you think about providing the tags via a top-level query parameter like 
this?

{{q=mainquery&fq=status:public&fq=\{!tag=dt}doctype:pdf&broadenFiltersForElevation=dt}}

 

> provide option for Query Elevation Component to bypass filters
> --------------------------------------------------------------
>
>                 Key: SOLR-16496
>                 URL: https://issues.apache.org/jira/browse/SOLR-16496
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SearchComponents - other
>            Reporter: Rudi Seitz
>            Priority: Major
>
> The Query Elevation Component respects the fq parameter.
> A document listed in elevate.xml or specified via the {{elevateIds}} 
> parameter must match the provided filter queries in order to be included in 
> the result set for a given query. Documents that don't match the filter 
> queries will be excluded regardless of whether they are supposed to be 
> "elevated."
> In some cases, this behavior is desirable; in other cases, it is not. For 
> example, an ecommerce landing page might filter products according to whether 
> they are in stock ({{{}fq=inStock:true{}}}) but might wish to show certain 
> promoted products regardless of inventory.
> This ticket asks for an {{elevateFilteredDocs}} parameter that could be set 
> to true to include elevated documents in the result set regardless of whether 
> they match the provided filter queries. The default would be false, in 
> accordance with the current behavior.
> This parameter would allow elevated documents to "bypass" the provided 
> filters, while keeping the filters in place for non-elevated documents.
> From an implementation standpoint, this parameter could be supported with 
> code in {{QueryElevationComponent#setQuery}} that updates the filter queries 
> in similar way to how the main query is updated. When 
> {{{}elevateFilteredDocs=true{}}}, each filter query would become a boolean 
> "OR" of the original filter query with a second query matching the elevated 
> documents by id.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to