KorAP / Krill

:mag: A Corpus Data Retrieval Index using Lucene for Look-Ups
BSD 2-Clause "Simplified" License
16 stars 3 forks source link

Span reference query error #61

Open margaretha opened 5 years ago

margaretha commented 5 years ago

Krill fails to process the following Annis query and throws HTTP error code 500:

"ich" & pos="VVFIN" & #1 ->malt/d[func="SUBJ"] #2 & #1 . #2

The error message is:

java.lang.IllegalArgumentException: Class number must be bigger than 0.
    at de.ids_mannheim.korap.query.wrap.SpanReferenceQueryWrapper.(SpanReferenceQueryWrapper.java:29)
    at de.ids_mannheim.korap.KrillQuery._operationReferenceFromJSON(KrillQuery.java:506)
    at de.ids_mannheim.korap.KrillQuery._groupFromJson(KrillQuery.java:415)
    at de.ids_mannheim.korap.KrillQuery._fromKoral(KrillQuery.java:237)
    at de.ids_mannheim.korap.KrillQuery._fromKoral(KrillQuery.java:221)
    at de.ids_mannheim.korap.KrillQuery.fromKoral(KrillQuery.java:217)
    at de.ids_mannheim.korap.Krill.fromKoral(Krill.java:165)
    at de.ids_mannheim.korap.Krill.fromKoral(Krill.java:137)

The corresponding Koral query is shown below.

{
    "query": {
        "operands": [
            {
                "operands": [{
                    "operands": [
                        {
                            "operands": [{
                                "@type": "koral:token",
                                "wrap": {
                                    "@type": "koral:term",
                                    "match": "match:eq",
                                    "layer": "orth",
                                    "key": "ich"
                                }
                            }],
                            "classOut": 129,
                            "@type": "koral:group",
                            "operation": "operation:class"
                        },
                        {
                            "operands": [{
                                "@type": "koral:token",
                                "wrap": {
                                    "@type": "koral:term",
                                    "match": "match:eq",
                                    "layer": "p",
                                    "key": "VVFIN"
                                }
                            }],
                            "classOut": 130,
                            "@type": "koral:group",
                            "operation": "operation:class"
                        }
                    ],
                    "@type": "koral:group",
                    "relType": {
                        "@type": "koral:relation",
                        "wrap": {
                            "foundry": "malt",
                            "@type": "koral:term",
                            "match": "match:eq",
                            "layer": "d",
                            "key": "SUBJ"
                        }
                    },
                    "operation": "operation:relation"
                }],
                "@type": "koral:reference",
                "operation": "operation:focus",
                "classRef": [129]
            },
            {
                "@type": "koral:reference",
                "operation": "operation:focus",
                "classRef": [130]
            }
        ],
        "@type": "koral:group",
        "inOrder": true,
        "operation": "operation:sequence"
    },
    "@context": "http://korap.ids-mannheim.de/ns/koral/0.3/context.jsonld"
}