Well, the very first thing I would is examine the field definition in
your schema file. I suspect that the tokenizers and/or
filters you're using for indexing and/or querying is doing something
to the # symbol. Most likely stripping it. If you're just searching
for the single-letter term "#", I *think* the query parser silently just
drops that part of the clause out, but check on that.....

The second thing would be to get a copy of Luke and examine your
index to see if what you *think* is in your index actually is there.

HTH
Erick

On Mon, Dec 7, 2009 at 3:28 PM, Joel Nylund <jnyl...@yahoo.com> wrote:

> ok thanks,  sorry my brain wasn't working, but even when I url encode it, I
> dont get any results, is there something special I have to do for solr?
>
> thanks
> Joel
>
>
> On Dec 7, 2009, at 3:20 PM, Paul Libbrecht wrote:
>
>  Sure you have to escape it! %23
>>
>> otherwise the browser considers it as a separator between the URL for the
>> server (on the left) and the fragment identifier (on the right) which is not
>> sent the server.
>>
>> You might want to read about "URL-encoding", escaping with backslash is a
>> shell-thing, not a thing for URLs!
>>
>> paul
>>
>>
>> Le 07-déc.-09 à 21:16, Joel Nylund a écrit :
>>
>>  Hi,
>>>
>>> How can I put a # sign in a query, do I need to escape it?
>>>
>>> For example I want to query books with title that contain #
>>>
>>> No work so far:
>>> http://localhost:8983/solr/select?q=textTitle:"#";
>>> http://localhost:8983/solr/select?q=textTitle:#
>>> http://localhost:8983/solr/select?q=textTitle:"\#";
>>>
>>> Getting
>>> org.apache.lucene.queryParser.ParseException: Cannot parse 'textTitle:\':
>>> Lexical error at line 1, column 12.  Encountered: <EOF> after : ""
>>>
>>> and sometimes just no response.
>>>
>>>
>>> thanks
>>> Joel
>>>
>>>
>>
>

Reply via email to