-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a 'user_identifier' argument to the zdb_multi_search() functions, and change the returned result set to aggregate scores and row_data, so that there's one row returned per table specified. This should make working with the results a lot easier for client applications.
- Loading branch information
1 parent
e0f2450
commit b3c7f6c
Showing
5 changed files
with
91 additions
and
95 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
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 |
---|---|---|
@@ -1,35 +1,7 @@ | ||
select table_name, query, total from zdb_multi_search(ARRAY['so_posts', 'so_users', 'words'], 'cheese'); | ||
table_name | query | total | ||
------------+--------+------- | ||
so_posts | cheese | 48 | ||
so_posts | cheese | 48 | ||
so_posts | cheese | 48 | ||
so_posts | cheese | 48 | ||
so_posts | cheese | 48 | ||
so_posts | cheese | 48 | ||
so_posts | cheese | 48 | ||
so_posts | cheese | 48 | ||
so_posts | cheese | 48 | ||
so_posts | cheese | 48 | ||
so_users | cheese | 19 | ||
so_users | cheese | 19 | ||
so_users | cheese | 19 | ||
so_users | cheese | 19 | ||
so_users | cheese | 19 | ||
so_users | cheese | 19 | ||
so_users | cheese | 19 | ||
so_users | cheese | 19 | ||
so_users | cheese | 19 | ||
so_users | cheese | 19 | ||
words | cheese | 54 | ||
words | cheese | 54 | ||
words | cheese | 54 | ||
words | cheese | 54 | ||
words | cheese | 54 | ||
words | cheese | 54 | ||
words | cheese | 54 | ||
words | cheese | 54 | ||
words | cheese | 54 | ||
words | cheese | 54 | ||
(30 rows) | ||
select table_name, user_identifier, query, total from zdb_multi_search(ARRAY['so_posts', 'so_users'], ARRAY['a', 'b'], 'java javascript'); | ||
table_name | user_identifier | query | total | ||
------------+-----------------+-----------------+------- | ||
so_posts | a | java javascript | 1171 | ||
so_users | b | java javascript | 1309 | ||
(2 rows) | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
select table_name, query, total from zdb_multi_search(ARRAY['so_posts', 'so_users', 'words'], 'cheese'); | ||
select table_name, user_identifier, query, total from zdb_multi_search(ARRAY['so_posts', 'so_users'], ARRAY['a', 'b'], 'java javascript'); |