vespa icon indicating copy to clipboard operation
vespa copied to clipboard

Unable to import predicate field from referenced document

Open morimekta opened this issue 6 years ago • 5 comments

Given two document types:

Document A (global):

search A {
    document A {
        field availability type predicate {
            indexing: summary | attribute
            index {
                # 1970-01-01
                lower-bound: 0
                # 2100-01-01
                upper-bound: 4102441200
                arity: 8
            }
        }
    }
}

Document B:

search B {
    document B {
        field a_ref type reference<A> {
            index: attribute
        }
    }
    import field a_ref.availability as availability {}
}

Results in the error message on preparing the application:

Invalid application package: default.default: Error loading model: This aspect is not meaningful or relevant for an imported field.

I can not find any place in the documentation where it says this is not possible, unless predicates are secretly handled as tensors (see top of this), which in case the docs should be updated to include predicates. If this should be possible it would be nice to know what is wrong in the case above.

Also IMHO the error message is too vague.

morimekta avatar Dec 04 '17 16:12 morimekta

Also IMHO the error message is too vague.

Agree. I just fixed that. @geirst will have to answer the rest.

bratseth avatar Dec 05 '17 02:12 bratseth

Update: This is some missing functionality and @geirst is working on fixing it. I think his current plan is to first to complete all the work and afterwards update this ticket.

bratseth avatar Dec 06 '17 23:12 bratseth

Handling of imported predicate fields in the config model has been fixed (https://github.com/vespa-engine/vespa/pull/4373) and it is possible to deploy the application. There are still some problems in the search core that must be addressed for this to work end-to-end.

geirst avatar Dec 13 '17 12:12 geirst

Status @geirst ?

bratseth avatar Apr 11 '19 09:04 bratseth

@bratseth This work has not been prioritised and the status is the same. Supporting this requires a lot more work than when we added support for importing tensor attributes.

geirst avatar Apr 11 '19 11:04 geirst