Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Search only checks the base struct nor the embedded ones #58

Open
PumpkinSeed opened this issue Oct 2, 2019 · 0 comments
Open

Search only checks the base struct nor the embedded ones #58

PumpkinSeed opened this issue Oct 2, 2019 · 0 comments
Labels
bug Something isn't working hacktoberfest Participate to Hacktoberfest
Milestone

Comments

@PumpkinSeed
Copy link
Owner

PumpkinSeed commented Oct 2, 2019

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":"[email protected]","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"}

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 and store as well and in case of result it will return the webshop's document key in all cases.

@PumpkinSeed PumpkinSeed added the bug Something isn't working label Oct 2, 2019
@PumpkinSeed PumpkinSeed added the hacktoberfest Participate to Hacktoberfest label Oct 3, 2019
@PumpkinSeed PumpkinSeed added this to the v0.2.0 milestone Oct 3, 2019
@PumpkinSeed PumpkinSeed modified the milestones: 0.2.0, backlog Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working hacktoberfest Participate to Hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant