Open PumpkinSeed opened 4 years ago
For example we have the following json.
{ "token":"bmau53eg8ubfah4bg7eg", "creation_date":"2019-10-03 11:59:09.271784777 +0000 UTC", "modification_date":"", "status":"processed", "payment_method":"card", ... "shipping_method":"Free shipping", "will_be_paid_later":false, "payment_transaction_id":"bmau53eg8ubfah4bg7f0", "product":{ "id":"bmau53eg8ubfah4bg7fg", ... "status":"active" }, "store":{ "id":"bmau53eg8ubfah4bg7h0", ... "description":"Product shop" } }
Since the main principles of bucket that it shouldn't store embedded fields, so because of the referenced tags it will stored as:
Key: webshop::1234 Value: {"token":"bmau53eg8ubfah4bg7eg","creation_date":"2019-10-03 11:59:09.271784777 +0000 UTC","modification_date":"","status":"processed","payment_method":"card","invoice_number":"inv-0069947","email":"mathiashauck@rosenbaum.info","card_holder_name":"Sheldon Kassulke","credit_card_last_4_digits":"4541" .... "shipping_address_postal_code":"84157","payment_transaction_id":"bmau53eg8ubfah4bg7f0"}
Key: product::1234 Value: {"id":"bmau53eg8ubfah4bg7fg", ... "status":"active"}
Key: store::1234 Value: {"id":"bmau53eg8ubfah4bg7h0", ... "description":"Product shop"}
Inside the fts.go we have many Search methods. We should make sure if we perform a search on webshop it will do the search in product and store as well and in case of result it will return the webshop's document key in all cases.
product
store
For example we have the following json.
Since the main principles of bucket that it shouldn't store embedded fields, so because of the referenced tags it will stored as:
Issue
Inside the fts.go we have many Search methods. We should make sure if we perform a search on webshop it will do the search in
product
andstore
as well and in case of result it will return the webshop's document key in all cases.