You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Removing the query-string from a SearchRequest might be used to keep e.g. the category selections while not limiting the result by a search query string anymore.
In solr v11.2 it was possible to completely remove the query-string from a SearchRequest by setting it to null.
Introduced in solr v11.5 by 61076e3 the method SearchRequest::setRawQueryString(string $rawQueryString = '') enforces a string. Thereby it is no longer possible to set the query-string to null.
Alternative B:
Set query string to empty string …->setRawQueryString(''):
But this will result in an unnecessary empty query-string in the url: https://example.com/search/?tx_solr[filter][0]=altType%3ASomeCategory&tx_solr[q]=
Additional context
Completely removing the SearchRequest is afaik only usefull with allowEmptyQuery set in TS-config:
Is your feature request related to a problem? Please describe.
Removing the query-string from a
SearchRequest
might be used to keep e.g. the category selections while not limiting the result by a search query string anymore.In solr v11.2 it was possible to completely remove the query-string from a
SearchRequest
by setting it tonull
.E.g. using a custom ViewHelper:
Introduced in solr v11.5 by 61076e3 the method
SearchRequest::setRawQueryString(string $rawQueryString = '')
enforces a string. Thereby it is no longer possible to set the query-string tonull
.ext-solr/Classes/Domain/Search/SearchRequest.php
Lines 436 to 439 in dfcdd98
Describe the solution you'd like
Introduce a new method that removes the query-string from
SearchRequest
.Describe alternatives you've considered
Alternative A:
Allow
null
as argument for the method:Alternative B:
Set query string to empty string
…->setRawQueryString('')
:But this will result in an unnecessary empty query-string in the url:
https://example.com/search/?tx_solr[filter][0]=altType%3ASomeCategory&tx_solr[q]=
Additional context
Completely removing the
SearchRequest
is afaik only usefull withallowEmptyQuery
set in TS-config:Target versions
The text was updated successfully, but these errors were encountered: