|
|
|
|
|
by atombender
2527 days ago
|
|
Another thing is that Vespa doesn't seem to support indexing of nested data, either structs or arrays of structs. For example: {
"location": {
"city": "Washington",
"state: "District of Columbia"
},
"friends": [
{"firstName: "Bill", "lastName": "Clinton"}
]
}
Maps aren't suitable here because they can't be used for ranking. So you have to use structs, but those aren't indexable.An application's search module could flatten the location key (e.g. "location_city", "location_state") for simple attributes, but the same is not possible for the array, since there can be arbitrary array elements. And you can't split it to an array of strings: "friends_firstName_elems": ["Bill"]
"friends_lastName_elems": ["Clinton"]
...because queries like "firstName contains 'Bill' and lastName contains 'Clinton'" could match different records ("Bill Bryson" and "George Clinton"). Never mind deeply nested arrays of objects containing arrays containing objects containing arrays.This seems unnecessarily restrictive. A search engine should be able to index the data you already have, not force the application to contort its data to whatever shape the engine requires. Is there no way around this? |
|