Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query and utf-8 encoding issues #10

Open
sirkosi opened this issue Jul 28, 2013 · 0 comments
Open

query and utf-8 encoding issues #10

sirkosi opened this issue Jul 28, 2013 · 0 comments

Comments

@sirkosi
Copy link

sirkosi commented Jul 28, 2013

Hi,

I had trouble getting some results through my queries so I modified the code a little.

At first I had some issues with the generated query which generated the following query:
Built query: {u'tags.highway': {'$exists': True}}

After I modified map_server.py:307 into this:

groups = re.findall(r'(?:\[(.*?)\])', xapiQuery.encode("utf-8"))

The map_server.py seems to generate now the correct strings without the prefix 'u'.

Also, in my generated Mongo DB the 'tags' in each element are called 'tg' and the wildcard query did not look very correct to me, so I modified map_server:326-329 into this:

elif right == u'*':
  q['ky'] = { '$in': [left] }
else:
  q['tg'] = [left, right]

I tested the new queries with the modified map_server.py and MongoHub.
Could someone confirm or deny my changes? Thanks in advance.

Best regards

PS I'm not a python programmer, so my changes might be not very stylish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant