Use plain table search history

This is easier, clearer, faster for inters, and ultimately not really much less space efficient than trying to store this in a serialized nor unreasonably slow for retrievals.

Food for thought: Would this might be well-suited to a nosql database?
This commit is contained in:
NMerz
2020-11-14 12:05:50 -05:00
parent 8653b9a035
commit 3afaad89ea
7 changed files with 40 additions and 79 deletions

View File

@@ -29,10 +29,18 @@ public class ItemSearcher implements CallHandler {
ItemSearch searchResultsObject = new ItemSearch(searchResults);
System.out.println(searchResultsObject);
InvokeRequest invokeRequest = new InvokeRequest();
invokeRequest.setFunctionName("SearchHistoryUpdate");
invokeRequest.setFunctionName("SearchHistoryPOST");
invokeRequest.setPayload("{" +
" \"newSearch\": \"" + queryParams.get("id") + "\"," +
" \"cognitoID\": \""+ cognitoID + "\"" +
" \"body\": {" +
" \"searchTerm\": \"" + queryParams.get("id") + "\"" +
" }," +
" \"params\": {" +
" \"querystring\": {" +
" }" +
" }," +
" \"context\": {" +
" \"sub\": \"" + cognitoID + "\"" +
" }" +
"}");
invokeRequest.setInvocationType("Event");
System.out.println(invokeRequest);