Closed tobias-karrer closed 9 months ago
This is the intended behavior.
This is the intended behavior.
Really?!? Queries like &fq=search_exclude:"false"&fq=search_exclude:"false"&fq=search_exclude:"false" ... are intented?
It adding fq=search_exclude:"false", regardless of whether there is already another parameter fq=search_exclude:"xyz" or fq=-search_exclude:"xyz", is the intended behavior.
You only end up with your example &fq=search_exclude:"false"&fq=search_exclude:"false"&fq=search_exclude:"false" if you reuse a query object for multiple searches, so I suggest you don't do that.
I do so to search in batches (where only "start" changes), as the search is limited to 400 resources. Increasing maxProcessedResults is in parts possible, but does not help everywhere. Rebuilding the whole query would not be effective.
As workaround I now remove the filter query for "search_exclude" before searching again. But it would be better if CmsSolrIndex.java wouldn't set it multiple times.
Good point. Done.
Query param &fq=search_exclude:"false" will be set in CmsSolrIndex#search() even if CmsSolrQuery query passed already contains the param.
There should be a check if already set before adding it here: https://github.com/alkacon/opencms-core/blob/master/src/org/opencms/search/solr/CmsSolrIndex.java#L882