Search code examples
pythonapiravendb

PyravenDB wrong query parsing


I'm using pyravendb + ravendb in order to store webpages. The main issue here is that when the url is in this form :

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

pyravendb seems lost and tries to find the 021345 index (which obviously doesnt exists).

An example would be the following : the url

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

the query session.query().where_equals("url",url).select("Id","html","date","metadata")

gives this stack

  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

Which is normal since there is no index 63935, it seems to be mistaking the url parameter for a query parameter.

Any help in how to fix it ? Thank you !


Solution

  • Fixed via a new version of RavenDB !