You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ian Connor <ia...@gmail.com> on 2008/07/21 23:15:37 UTC

How do you query for a string containing a colon?

Hi,

I am trying to query a "doi" field. However, a doi can contain a ":"
colon character and the query parser throws an error at this point.

How do you escape a colon?

-- 
Regards,

Ian

Re: How do you query for a string containing a colon?

Posted by Mike Klaas <mi...@gmail.com>.
On 21-Jul-08, at 2:15 PM, Ian Connor wrote:

> Hi,
>
> I am trying to query a "doi" field. However, a doi can contain a ":"
> colon character and the query parser throws an error at this point.
>
> How do you escape a colon?

You can escape anything with a backslash, and most things with  
quotation marks:

std\:\:string
"std::string"
etc.

-Mike