2017-03-02 60 views
0

我使用pyravendb + ravendb为了存储网页。这里的主要问题是,当URL是这种形式:PyravenDB错误的查询解析

http://www.somedomain.com/nicepage.html?stuff=param&id=021345 

pyravendb似乎失去,并试图找到021345指数(这显然犯规存在)。

一个例子是以下几点: 网址

http://www.example.com/ebx/LinkResolverServlet?classofcontent=Standard&id=63935 

查询 session.query()where_equals( “URL”,URL)。选择( “ID”, “HTML”,”。日期”,‘元数据’)

给出了这样的堆栈

File "/home/myusername/***********/somepythonfile.py", line 60, in getDocumentbyURL 
    query_result = list(session.query().where_equals("url",url).select("Id","html","date","metadata")) 
    File "/usr/local/lib/python3.5/dist-packages/pyravendb/store/session_query.py", line 92, in __iter__ 
    return self._execute_query().__iter__() 
    File "/usr/local/lib/python3.5/dist-packages/pyravendb/store/session_query.py", line 332, in _execute_query 
    includes=self.includes) 
    File "/usr/local/lib/python3.5/dist-packages/pyravendb/d_commands/database_commands.py", line 286, in query 
    raise exceptions.ErrorResponseException(response["Error"][:100]) 
pyravendb.custom_exceptions.exceptions.ErrorResponseException: Could not find index named: 63935 

Could not find index named: 63935 

这是正常的,因为没有指数63935,它似乎被误认为是一个查询parame url参数之三。

如何解决它的任何帮助? 谢谢!

+2

你可以尝试使用最新版本?转义的查询可能与相关的问题有关。 –

+0

谢谢! 明天早上试试吧,我会更新它。 – Neil

+1

在上次更新中修复了此问题 –

回答

0

通过RavenDB的新版本修复!