I am using Text index in my project, the model looks like:
Group {
"group_id": {
"space": String,
"suffix": String
},
"group_info" {
"group_name": String
}
}
The index is defined as follow:
new Index(
"contact_group_name_text",
field("group_info").nest(field("group_name")).groupBy("group_id"),
IndexTypes.TEXT
)
This index is used to support query: "Given (text
, space
), find all the groups that has name contains text
and group_id.space
equals to space
"
My questions are:
- Does the index defined above serve my purposed, or there is anther proper way?
- How does
Record Layer
store the data to support the index above?