As I said in my original post, I'd already tried various methods of escaping: :call that using key = "id" and value = :"-3f66fdfb1ef5f8719f65a7403e93cc9d" and I get an exception. If I :change value to "\"-3f66fdfb1ef5f8719f65a7403e93cc9d\"", I get no :results. If I change value to "\-3f66fdfb1ef5f8719f65a7403e93cc9d", I :get no results. If I change value to :"\"\-3f66fdfb1ef5f8719f65a7403e93cc9d\"", I get no results.
But it turned out that the values I was querying for had been added but not committed. On Sun, Feb 20, 2011 at 11:17 AM, Markus Jelsma <markus.jel...@openindex.io> wrote: > He could also just escape it or am i missing something? > >> --- On Sun, 2/20/11, Paul Tomblin <ptomb...@xcski.com> wrote: >> > From: Paul Tomblin <ptomb...@xcski.com> >> > Subject: Re: How to get a field that starts with a minus? >> > To: solr-user@lucene.apache.org >> > Date: Sunday, February 20, 2011, 5:53 PM >> > Yes, it's string: >> > <fieldType name="string" >> > class="solr.StrField" >> > >> > sortMissingLast="true" omitNorms="true"/> >> > <field name="id" >> > type="string" stored="true" indexed="true"/> >> >> No, string is OK. In this case it is better to use raw or field query >> parser. >> >> SolrQuery.setQuery("{!raw f=id}-3f66fdfb1ef5f8719f65a7403e93cc9d"); > -- http://www.linkedin.com/in/paultomblin http://careers.stackoverflow.com/ptomblin