vespa
vespa copied to clipboard
Default summary behaviour
Describe the bug
I am trying to leverage the feature of document summary inheritance
document-summary [name] inherits [document-summary] {
[body]
}
to query required fields for different use cases.
For example, I have a document with following structure.
schema d{
document d{
field f1 type string{
indexing: summary | index
}
field f2_text type string{
indexing: index
}
field f3_pii type string{
indexing: index
}
}
document-summary withText inherits default {
summary f2_text type string {}
}
document-summary withPii {
summary f3_pii type {}
}
}
In above scenario, if my presentation is withText, i should get f1,f2_text fields in response, but i am getting f3_pii as well.
Also, i had discussion about this on slack, Jon Bratseth said this would get fixed in Vespa 9. creating this git issue for my tracking** https://vespatalk.slack.com/archives/C01QNBPPNT1/p1695271560459409
To Reproduce
Steps to reproduce the behavior:
- Create a document summary d1 with inheriting document-summary default , create other document-summary d2 with different document summary
- query with d1, it will also give fields in d2
Expected behavior
when queried with document summary d1, it should return fields in d1 only
Environment (please complete the following information):
- OS: RHEL8
- Infrastructure: self-hosted
Vespa version
8.x
Thank you, could you please format your issue report better and possible simplify it? Note that all fields that has summary
will always be part of the default
document-summary.
Thank you, could you please format your issue report better and possible simplify it? Note that all fields that has
summary
will always be part of thedefault
document-summary.
@jobergum , I have simplified the issue explanation, please check. Yes i agree that fields having indexing summary will be part of document-summary default
Github issues offer a preview option, where you can view your formatting. I took the liberty to format your issue description for readability. Notice the preview tab.
In above scenario, if my presentation is withText, i should get f1,f2_text fields in response, but i am getting f3_pii as well.
That is because all fields with a summary
or created implicit by within a document-summary
are added to the default
summary, and withText
inherits default
.
The behaviour of the default
summary is documented. This is something that we want to address in Vespa 9, but not a change we can "fix" in a minor release.
A special document summary named default is always present and used by default. This contains: all fields which specifies in their indexing statements that they may be included in summaries all fields specified in any document summary sddocname documentid.