Skip to content

transmute parsing error #66

@hscells

Description

@hscells

Not sure what the original query was...

stack trace:

POST /api/query2cqr HTTP/1.1
Host: localhost:8000
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Content-Length: 18
Content-Type: application/x-www-form-urlencoded
Origin: https://ielab-sysrev2.uqcloud.net
Referer: https://ielab-sysrev2.uqcloud.net/plugin/queryvis
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin

runtime error: index out of range [0] with length 0
/usr/lib/go-1.13/src/runtime/panic.go:75 (0x839162)
        goPanicIndex: panic(boundsError{x: int64(x), signed: true, y: y, code: boundsIndex})
/home/harry/go/src/github.com/hscells/transmute/parser/pubmed.go:318 (0xdc657d)
        PubMedTransformer.ParseInfixKeywords: if prefix[0] == "(" && prefix[len(prefix)-1] == ")" {
/home/harry/go/src/github.com/hscells/transmute/parser/pubmed.go:197 (0xdc47c4)
        PubMedTransformer.TransformNested: return t.ParseInfixKeywords(query, mapping)
/home/harry/go/src/github.com/hscells/transmute/parser/parser.go:32 (0xdc3eef)
        QueryParser.Parse: return q.Parser.TransformNested(ast.Value, q.FieldMapping)
/home/harry/go/src/github.com/hscells/transmute/pipeline/pipeline.go:80 (0xdd0a72)
        TransmutePipeline.Execute: boolQuery := p.Parser.Parse(ast)
/home/harry/go/src/github.com/ielab/searchrefiner/api.go:638 (0x11182bf)
        ApiQuery2CQR: cq, err := compiler.Execute(rawQuery)
/home/harry/go/src/github.com/gin-gonic/gin/context.go:165 (0xd8e37a)
        (*Context).Next: c.handlers[c.index](c)
/home/harry/go/src/github.com/gin-contrib/gzip/handler.go:60 (0xda4263)
        (*gzipHandler).Handle: c.Next()
/home/harry/go/src/github.com/gin-gonic/gin/context.go:165 (0xd8e37a)
        (*Context).Next: c.handlers[c.index](c)
/home/harry/go/src/github.com/ielab/searchrefiner/cmd/searchrefiner/server.go:165 (0x112b241)
        main.func2: c.Next()
/home/harry/go/src/github.com/gin-gonic/gin/context.go:165 (0xd8e37a)
        (*Context).Next: c.handlers[c.index](c)
/home/harry/go/src/github.com/gin-gonic/gin/logger.go:241 (0xda14f0)
        LoggerWithConfig.func1: c.Next()
/home/harry/go/src/github.com/gin-gonic/gin/context.go:165 (0xd8e37a)
        (*Context).Next: c.handlers[c.index](c)
/home/harry/go/src/github.com/gin-gonic/gin/recovery.go:83 (0xda23c3)
        RecoveryWithWriter.func1: c.Next()
/home/harry/go/src/github.com/gin-gonic/gin/context.go:165 (0xd8e37a)
        (*Context).Next: c.handlers[c.index](c)
/home/harry/go/src/github.com/gin-gonic/gin/logger.go:241 (0xda14f0)
        LoggerWithConfig.func1: c.Next()
/home/harry/go/src/github.com/gin-gonic/gin/context.go:165 (0xd8e37a)
        (*Context).Next: c.handlers[c.index](c)
/home/harry/go/src/github.com/gin-gonic/gin/gin.go:420 (0xd985d0)
        (*Engine).handleHTTPRequest: c.Next()
/home/harry/go/src/github.com/gin-gonic/gin/gin.go:376 (0xd97d3c)
        (*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/usr/lib/go-1.13/src/net/http/server.go:2802 (0xb046b3)
        serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/lib/go-1.13/src/net/http/server.go:1890 (0xafff54)
        (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/lib/go-1.13/src/runtime/asm_amd64.s:1357 (0x8685b0)
        goexit: BYTE    $0x90   // NOP

[GIN-debug] [WARNING] Headers were already written. Wanted to override status code 200 with 500

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions