4

I am able to store values in couchdb-lucene with whatever key I like, but it seems that if the key includes any chars outside of [0-9a-zA-Z_] any search fails.

Does anyone know what chars are valid and/or how to properly escape special chars in searches such that special chars can be used?

Zack Bloom
  • 8,309
  • 2
  • 20
  • 27

2 Answers2

4

This shows how to escape special characters and also gives a list of such characters.

nikhil500
  • 3,458
  • 19
  • 23
  • Unfortunately, escaping as mentioned on that page does not work for the key names. "a-b" and "a\-b" will both fail to find the field. – Zack Bloom Mar 14 '11 at 20:48
  • Depending on your schema, phrase queries may work. Try `"a-b"` and `"a\-b"` (with the quotes). Also, verify that the field is getting added to the index with the correct value. – nikhil500 Mar 15 '11 at 03:02
0

All UTF-8 characters should work. I've just verified that I can search for items with é, for example.

A little more information on how you're querying would help, though given the age of this ticket perhaps you've moved on.

Robert Newson
  • 4,631
  • 20
  • 18