The below doc is a sample of one of 100 K doc in my store which are of type tract::id.
I created secondary index on the common fields like type, id, city etc. and it works pretty well when query by that.
But here is where i think i need some more index’s when i want to get all docs which have models with 4 + Bath or with pool, or where the house is on a certain street as i can get that info but it takes quite some time. Also as most my nbr’s are stored in a string i use the tonumber fuction , do i pay a huge penalty special on sort or select ?
So how would i create an secondary Index for the Street element which only stores array of string and as well as for models.Bath and Models.Pool
thanks
{
"type": "tractInfo",
"id": "001c4222-fbf3-4d74-b87d-882d7dc704df",
"tractid": "771",
"county": "Orange",
"Tract Name": "Gallery at Sorrento",
"B/T Code": "GALRY",
"City": "Cypress",
"City Code": "CYP",
"Area": "Cypress North of Katella",
"Area Code": "80",
"Nbhd": "Sorrento",
"Zip Code": "90630",
"created_on": "2018-10-12T00:31:37.828Z",
"created_by": "ap",
"feature": {
"Type": "SFR",
"Units": "",
"Attached": "No",
"Gated": "No",
"Pool": "No",
"Spa": "No",
"Tennis": "No",
"Golf": "No",
"55 +": "No",
"Builder": "Cypress Homes - Fieldstone",
"Notes": "BROCHURE BUTTON\nSUBSCRIBERS: After clicking on the Premium Report, a BROCHURE button will appear. Click on that TAB and PDF documents will appear with all of our information on this project. After that, you may either print or save the whole document or print one page at a time."
},
"street": [
"Corso Cir",
"Linaro Dr",
"Ravari Dr",
"Ravenna Way",
"Tremezzo Dr (models)",
"Trevi St"
],
"model": [
{
"Model Name": "Plan One",
"Model Code": "A",
"Bed": "4",
"Bath": "2.50",
"SqFt": "2424",
"Levls": "B",
"Fam": "Yes",
"Din": "DA",
"Nook": "Yes",
"Den": "No",
"Bon": "No",
"Loft": "No",
"Fpl": "1",
"Util": "IR",
"Gar": "3"
},
{
"Model Name": "Plan Two",
"Model Code": "B",
"Bed": "4",
"Bath": "3.00",
"SqFt": "2614",
"Levls": "B",
"Fam": "Yes",
"Din": "DA",
"Nook": "Yes",
"Den": "No",
"Bon": "No",
"Loft": "No",
"Fpl": "1",
"Util": "IR",
"Gar": "3"
},
{
"Model Name": "Plan Three",
"Model Code": "C",
"Bed": "5",
"Bath": "3.00",
"SqFt": "2900",
"Levls": "B",
"Fam": "Yes",
"Din": "DA",
"Nook": "Yes",
"Den": "No",
"Bon": "No",
"Loft": "No",
"Fpl": "1",
"Util": "IR",
"Gar": "3"
}
]