Skip to content

Deploy GAnswer via jar后,http请求返回结果异常 #31

Open

Description

@jamestch

按照文档进行jar包部署,且出现了"Server Ready!"。

但发送请求 :
http://ip:port/gSolve/?data={maxAnswerNum:3,%20maxSparqlNum:2,%20question:Who%20is%20the%20wife%20of%20Donald%20Trump?}
返回结果如下:
{"question":"Who is the wife of Donald Trump?","vars":["?wife"],"sparql":["select DISTINCT ?wife where { \t\t?wife. } LIMIT 3"],"results":{"bindings":[{"?wife":{"type":"uri","value":""}},{"?wife":{"type":"uri","value":""}},{"?wife":{"type":"uri","value":""}}]},"status":"200"}
返回结果中value为空,但是我看后台输出日志里面,实际已经查询到了结果,如下:
==========Group Simple Relations=========

Check query graph count: 80
Pass single check: 2
Pass final check: 3
TopkJoin time=3
number of rankedSparqls = 3
parameter: ?operation=query&username=root&password=123456&db_name=dbpedia16&format=txt&sparql=select DISTINCT ?wife where { <Donald_Trump> ?wife. } LIMIT 3
request: http://dbpedia16.gstore-pku.com:80/%3Foperation%3Dquery%26username%3Droot%26password%3D123456%26db_name%3Ddbpedia16%26format%3Dtxt%26sparql%3Dselect+DISTINCT+%3Fwife++where+%7B+%3CDonald_Trump%3E%09%3Cspouse%3E%09%3Fwife.+%7D+LIMIT+3
?wife
<Ivana_Trump>
<Melania_Trump>
<Marla_Maples>

ansNum=3
varNum=1
rawLines.length=4
Revise Answers:
line=?wife:<Ivana_Trump>
line=?wife:<Melania_Trump>
line=?wife:<Marla_Maples>
3
?wife:<Ivana_Trump>
?wife:<Melania_Trump>
?wife:<Marla_Maples>
看日志实际是有结果的,但是http请求看到的结果为空

Activity

  1. nicklin96 commented on Sep 11, 2019

    @nicklin96
    Collaborator

    您好!请问您是用什么方式获取和查看http请求返回的呢?
    如果您在浏览器中查看返回内容,实体名字可能会被识别成HTML tag而无法正常显示。您可以通过查看网页源代码看到被识别成HTML tag的内容

  2. jamestch commented on Sep 11, 2019

    @jamestch
    Author

    谢谢您的指导,的确如此,查看网页源代码可以看到返回结果。这个问题是不是纯粹是网页展示的问题,那是不是可以这样理解:我通过程序requests.post/get获取response后直接解析结果是不是不存在这个问题

  3. nicklin96 commented on Sep 11, 2019

    @nicklin96
    Collaborator

    是的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions