0

To exclude some documents from the search result, I can use the not in or - negative sign to specify the ids like this through a query.

select/?q=:&fq=-id:86+-id:338

But i want to pre configure in solr that on any search the results of certain documents will never show up

2 Answers2

2

You can add a parameter list to a definition for a requestHandler that appends a fq statement to all requests. The example from the wiki does something similar:

<lst name="appends">
  <!-- no matter what other fq are also used, always remove these two documents -->
  <str name="fq">-id:(86 338)</str>
</lst>

This fq will then always be appended to the request made.

MatsLindh
  • 49,529
  • 4
  • 53
  • 84
0

We can also use following :

<lst name="appends">
  <str name="excludeIds">86,338</str>
</lst>

I tried and it also gives expected result.

maddy man
  • 89
  • 4
  • 10