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 Furkan KAMACI <fu...@gmail.com> on 2013/05/29 16:55:45 UTC
Escaping & character at Query
I use Solr 4.2.1 and I analyze that keyword:
kelile&dimle
at admin page:
WT
kelile&dimle
SF
kelile&dimle
TLCF
kelile&dimle
However when I escape that charter and search it:
solr/select?q=kelile\&dimle
here is what I see:
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">148</int>
<lst name="params">
<str name="dimle"/>
*<str name="q">kelile\</str>*
</lst>
</lst>
I have edismax as default query parser. How can I escape that "&"
character, why it doesn't like that?:
<str name="q">kelile\&dimle</str>
Any ideas?
Re: Escaping & character at Query
Posted by Furkan KAMACI <fu...@gmail.com>.
When I write:
solr/select?q="kelile\&dimle"
it still says:
<lst name="params">
<str name="dimle""/>
*<str name="q">"kelile\</str>*
</lst>
2013/5/29 Carlos Bonilla <ca...@gmail.com>
> Hi,
> try with double quotation marks (" ").
>
> Carlos.
>
>
> 2013/5/29 Furkan KAMACI <fu...@gmail.com>
>
> > I use Solr 4.2.1 and I analyze that keyword:
> >
> > kelile&dimle
> >
> > at admin page:
> >
> > WT
> >
> > kelile&dimle
> >
> > SF
> >
> > kelile&dimle
> >
> > TLCF
> >
> > kelile&dimle
> >
> > However when I escape that charter and search it:
> >
> > solr/select?q=kelile\&dimle
> >
> > here is what I see:
> >
> > <response>
> > <lst name="responseHeader">
> > <int name="status">0</int>
> > <int name="QTime">148</int>
> > <lst name="params">
> > <str name="dimle"/>
> > *<str name="q">kelile\</str>*
> > </lst>
> > </lst>
> >
> > I have edismax as default query parser. How can I escape that "&"
> > character, why it doesn't like that?:
> >
> > <str name="q">kelile\&dimle</str>
> >
> > Any ideas?
> >
>
Re: Escaping & character at Query
Posted by Carlos Bonilla <ca...@gmail.com>.
Hi,
try with double quotation marks (" ").
Carlos.
2013/5/29 Furkan KAMACI <fu...@gmail.com>
> I use Solr 4.2.1 and I analyze that keyword:
>
> kelile&dimle
>
> at admin page:
>
> WT
>
> kelile&dimle
>
> SF
>
> kelile&dimle
>
> TLCF
>
> kelile&dimle
>
> However when I escape that charter and search it:
>
> solr/select?q=kelile\&dimle
>
> here is what I see:
>
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">148</int>
> <lst name="params">
> <str name="dimle"/>
> *<str name="q">kelile\</str>*
> </lst>
> </lst>
>
> I have edismax as default query parser. How can I escape that "&"
> character, why it doesn't like that?:
>
> <str name="q">kelile\&dimle</str>
>
> Any ideas?
>
Re: Escaping & character at Query
Posted by Jack Krupansky <ja...@basetechnology.com>.
So, make it:
solr/select?q="kelile%26dimle"
-- Jack Krupansky
-----Original Message-----
From: Carlos Bonilla
Sent: Wednesday, May 29, 2013 11:39 AM
To: solr-user@lucene.apache.org
Subject: Re: Escaping & character at Query
Hi, I meant:
solr/select?q="kelile&dimle"
Cheers.
2013/5/29 Jack Krupansky <ja...@basetechnology.com>
> You need to UUEncode the & with %26:
>
> ...solr/select?q=kelile%**26dimle
>
> Normally, & introduces a new URL query parameter in the URL.
>
> -- Jack Krupansky
>
> -----Original Message----- From: Furkan KAMACI Sent: Wednesday, May 29,
> 2013 10:55 AM To: solr-user@lucene.apache.org Subject: Escaping &
> character at Query
> I use Solr 4.2.1 and I analyze that keyword:
>
> kelile&dimle
>
> at admin page:
>
> WT
>
> kelile&dimle
>
> SF
>
> kelile&dimle
>
> TLCF
>
> kelile&dimle
>
> However when I escape that charter and search it:
>
> solr/select?q=kelile\&dimle
>
> here is what I see:
>
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">148</int>
> <lst name="params">
> <str name="dimle"/>
> *<str name="q">kelile\</str>*
> </lst>
> </lst>
>
> I have edismax as default query parser. How can I escape that "&"
> character, why it doesn't like that?:
>
> <str name="q">kelile\&dimle</str>
>
> Any ideas?
>
Re: Escaping & character at Query
Posted by Carlos Bonilla <ca...@gmail.com>.
Hi, I meant:
solr/select?q="kelile&dimle"
Cheers.
2013/5/29 Jack Krupansky <ja...@basetechnology.com>
> You need to UUEncode the & with %26:
>
> ...solr/select?q=kelile%**26dimle
>
> Normally, & introduces a new URL query parameter in the URL.
>
> -- Jack Krupansky
>
> -----Original Message----- From: Furkan KAMACI Sent: Wednesday, May 29,
> 2013 10:55 AM To: solr-user@lucene.apache.org Subject: Escaping &
> character at Query
> I use Solr 4.2.1 and I analyze that keyword:
>
> kelile&dimle
>
> at admin page:
>
> WT
>
> kelile&dimle
>
> SF
>
> kelile&dimle
>
> TLCF
>
> kelile&dimle
>
> However when I escape that charter and search it:
>
> solr/select?q=kelile\&dimle
>
> here is what I see:
>
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">148</int>
> <lst name="params">
> <str name="dimle"/>
> *<str name="q">kelile\</str>*
> </lst>
> </lst>
>
> I have edismax as default query parser. How can I escape that "&"
> character, why it doesn't like that?:
>
> <str name="q">kelile\&dimle</str>
>
> Any ideas?
>
Re: Escaping & character at Query
Posted by Jack Krupansky <ja...@basetechnology.com>.
You need to UUEncode the & with %26:
...solr/select?q=kelile%26dimle
Normally, & introduces a new URL query parameter in the URL.
-- Jack Krupansky
-----Original Message-----
From: Furkan KAMACI
Sent: Wednesday, May 29, 2013 10:55 AM
To: solr-user@lucene.apache.org
Subject: Escaping & character at Query
I use Solr 4.2.1 and I analyze that keyword:
kelile&dimle
at admin page:
WT
kelile&dimle
SF
kelile&dimle
TLCF
kelile&dimle
However when I escape that charter and search it:
solr/select?q=kelile\&dimle
here is what I see:
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">148</int>
<lst name="params">
<str name="dimle"/>
*<str name="q">kelile\</str>*
</lst>
</lst>
I have edismax as default query parser. How can I escape that "&"
character, why it doesn't like that?:
<str name="q">kelile\&dimle</str>
Any ideas?