Hi there,
I’m new to the forums. I’m sure this is an easy question, but I cannot find what I am doing wrong. I have a collection that I’ve filled with a couple thousand records. I can add new records to it; however, I cannot retrieve the new ones.
Here is how I created a record:
Create(Collection(“Child”), {
data: {
data: {
beneficiary_id: “1234”,
name: “Test”,
full_name: “Test”,
age: “5”,
date_of_birth: “1/11/2011”,
gender: “F”,
country: “Colombia”,
language_spoken: “Spanish”,
}
}
}
)
If I run the index called allChildren, it returns a bunch, but not all (even on the admin screen, it says results are limited to 100 for performance). So I ran it with a large size and it returns all, including the new children I created:
Map(
Paginate(Match(Index(“allChildren”)),
{
size: 10000
}
),
Lambda(“X”, Get(Var(“X”)))
)
Here is the weird thing. I created a new index to search for a child by name:
CreateIndex({
name: “children_by_name_shell”,
source: Collection(“Child”),
terms: [
{
field: [“data”, “name”]
}
]
})
If I run it on a child that prints out on the admin screen under allChildren index, it returns a record. But if I run it using the name of the new child, it returns an empty array, like it’s not found. But it’s clearly there when I query all and put in the large size (size: 10000). Is the index not searching all the records? Is there some limit?
Thanks in advance for any help!