Well, we are not making the http requests to solr, we are using a 3rd party component for that, which as configuration basically only takes a base URL (ie domain, port etc, without path) and the name of the collection. So it is not possible to define the request parser here. So we would have to specify it as a qt parameter when performing the search, but that is more or less the same as having to define the fq parameter to filter out unwanted documents. We would like the fundamental basic "no frills" default search to include this fq, while still not being hindered by it when using the solr admin gui. But, if I interpret you correctly that is impossible, right? ________________________________ From: Alexandre Rafalovitch <arafa...@gmail.com> Sent: Thursday, October 22, 2020 8:50 PM To: solr-user <solr-user@lucene.apache.org> Subject: Re: Possible to add a default "appends" fq except for queries in the admin GUI?
Why not have a custom handler endpoint for your online queries? You will be modifying them anyway to remove fq. Or even create individual endpoints for every significant use-case. You can share the configuration between them with initParams or useParams, but have more flexibility going forward. Admin UI allows you to change /select, but - like you said - manually and every time. Regards, Alex. On Thu, 22 Oct 2020 at 14:18, Batanun B <bata...@hotmail.com> wrote: > > Hi, > > We have multiple components that uses the Solr search feature on our > websites. But we have some documents in the index that we never want to > display in the search results (nothing secret or anything, just uninteresting > for the user to see). So far, we have added a fq to all our queries, that > filters out these documents. But we would like to not have to do this, since > there is always a risk of us forgetting to add that fq parameter. > > So, today i tried adding this fq in a "appends" list in the standard > requestHandler. I needed to add it to the standard one, since that's the one > that all the search components use (ie, no qt parameter defined, and i would > prefer not to have to change that). That worked fine. Until I needed to do a > query in the solr admin GUI, and realized that this filter query was used > there too, effectively hiding a bunch of documents that I as an administrator > need to see. > > Is there a way to avoid this problem? Can I somehow configure Solr to not use > this filter query when in the admin GUI? If I define a separate request > handler in solrconfig, can i make the admin GUI always use this by default? I > don't want to have to manually change the request handler in the admin GUI > every time. > > What I tried so far: > > * Adding the fq in the "appends" in the standard request handler, as > mentioned above. Causing the filter to always be in effect, even in admin GUI > * Keeping the configuration as above, but also adding a request handler with > name="/select", that doesn't have this fq defined. Then the filter was never > applied, not in admin GUI and not on any website search