Hi Guys,
We are trying to add search functionality to our application and decided to rely on FTS.
Documents that must be included in “search by name” have a nested structure that looks like this:
{
"type": "folders",
"workspaceId": 100,
"folders": [
{
"id": 107,
"name": "Birds",
"assetCount": 0,
"children": [
{
"id": 108,
"name": "Owl",
"children": [],
"assetCount": 10
},
{
"id": 109,
"name": "Parrot",
"assetCount": 20,
"children": [
{
"id": 110,
"name": "Crazy Bird",
"children": [ ],
"assetCount": 30
},
{
"id": 111,
"name": "Penguin",
"children": [ ],
"assetCount": 40
}
]
}
]
}
]
}
The use case is pretty simple.
User searches for “bir” and result set is (2 matches):
match 1
{
"id": 107,
"name": "Birds",
"assetCount": 0,
"workspaceId": 100
}
match 2
{
"id": 110,
"name": "Crazy Bird",
"assetCount": 30,
"workspaceId": 100
}
Is it possible to achieve this functionality using FTS or should we build a regular index and use N1QL?
Thank you.