-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
6 changed files
with
59 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[[filter-search-results]] | ||
== Filter search results | ||
|
||
You can use two methods to filter search results: | ||
|
||
* Use a boolean query with a `filter` clause. Search requests apply | ||
<<query-dsl-bool-query,boolean filters>> to both search hits and | ||
<<search-aggregations,aggregations>>. | ||
|
||
* Use the search API's `post_filter` parameter. Search requests apply | ||
<<post-filter,post filters>> only to search hits, not aggregations. You can use | ||
a post filter to calculate aggregations based on a broader result set, and then | ||
further narrow the results. | ||
+ | ||
You can also <<rescore,rescore>> hits after the post filter to | ||
improve relevance and reorder results. | ||
|
||
include::request/post-filter.asciidoc[] | ||
|
||
include::request/rescore.asciidoc[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters