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 Hakim Benoudjit <h....@gmail.com> on 2014/01/12 15:15:21 UTC

Correct to use to store urls (unicode)

hi,

what's the correct type used to store urls, which can contain some
encoded unicode caracters in the form '%<some-digits>'. Because, the
string type returns an error when I try to store these urls.
Btw, I'm using a python client which gives me this error: "'ascii'
codec can't decode byte 0xc3".

Re: Correct to use to store urls (unicode)

Posted by Hakim Benoudjit <h....@gmail.com>.
Because I only need to retreive the link not search by url. I have already
stored product id in an id field.

Thanks for your answer Gora!


2014/1/13 Gora Mohanty <go...@mimirtech.com>

> On 13 January 2014 00:30, Hakim Benoudjit <h....@gmail.com> wrote:
> >
> > Yep sure. But is it good for me to store a link(http://...) in a solr
> > string field? knowing that this field isnt indexed, only stored.
>
> Yes, there is no issue. Not sure why they are not indexed, but if
> that is what you want, ...
>
> Regards,
> Gora
>

Re: Correct to use to store urls (unicode)

Posted by Gora Mohanty <go...@mimirtech.com>.
On 13 January 2014 00:30, Hakim Benoudjit <h....@gmail.com> wrote:
>
> Yep sure. But is it good for me to store a link(http://...) in a solr
> string field? knowing that this field isnt indexed, only stored.

Yes, there is no issue. Not sure why they are not indexed, but if
that is what you want, ...

Regards,
Gora

Re: Correct to use to store urls (unicode)

Posted by Hakim Benoudjit <h....@gmail.com>.
Yep sure. But is it good for me to store a link(http://...) in a solr
string field? knowing that this field isnt indexed, only stored.


2014/1/12 Gora Mohanty <go...@mimirtech.com>

> On 12 January 2014 20:07, Hakim Benoudjit <h....@gmail.com> wrote:
> > I have just forget the u'' next to a unicode string :\,
>
> Heh! Handling of Unicode in Python 2.x is annoying. 3.x
> is better, but only a little. Off-topic on this list, so I will
> shut up now.
>
> Regards,
> Gora
>

Re: Correct to use to store urls (unicode)

Posted by Gora Mohanty <go...@mimirtech.com>.
On 12 January 2014 20:07, Hakim Benoudjit <h....@gmail.com> wrote:
> I have just forget the u'' next to a unicode string :\,

Heh! Handling of Unicode in Python 2.x is annoying. 3.x
is better, but only a little. Off-topic on this list, so I will
shut up now.

Regards,
Gora

Re: Correct to use to store urls (unicode)

Posted by Hakim Benoudjit <h....@gmail.com>.
I have just forget the u'' next to a unicode string :\,


2014/1/12 Hakim Benoudjit <h....@gmail.com>

> I can add this link using sunburnt (solr python client) so it can not be
> related to solr.
> I think you're right it might be a python issue.
>
> Thanks.
>
>
> 2014/1/12 Gora Mohanty <go...@mimirtech.com>
>
>> On 12 January 2014 19:45, Hakim Benoudjit <h....@gmail.com> wrote:
>> > hi,
>> >
>> > what's the correct type used to store urls, which can contain some
>> > encoded unicode caracters in the form '%<some-digits>'. Because, the
>> > string type returns an error when I try to store these urls.
>>
>> Please provide more details as that should not be the case.
>>
>> > Btw, I'm using a python client which gives me this error: "'ascii'
>> > codec can't decode byte 0xc3".
>>
>> That is a different issue having to do with Python, and the proper
>> handling of Unicode strings. Try searching Google, or asking on a
>> Python list.
>>
>> Regards,
>> Gora
>>
>
>

Re: Correct to use to store urls (unicode)

Posted by Hakim Benoudjit <h....@gmail.com>.
I can add this link using sunburnt (solr python client) so it can not be
related to solr.
I think you're right it might be a python issue.

Thanks.


2014/1/12 Gora Mohanty <go...@mimirtech.com>

> On 12 January 2014 19:45, Hakim Benoudjit <h....@gmail.com> wrote:
> > hi,
> >
> > what's the correct type used to store urls, which can contain some
> > encoded unicode caracters in the form '%<some-digits>'. Because, the
> > string type returns an error when I try to store these urls.
>
> Please provide more details as that should not be the case.
>
> > Btw, I'm using a python client which gives me this error: "'ascii'
> > codec can't decode byte 0xc3".
>
> That is a different issue having to do with Python, and the proper
> handling of Unicode strings. Try searching Google, or asking on a
> Python list.
>
> Regards,
> Gora
>

Re: Correct to use to store urls (unicode)

Posted by Gora Mohanty <go...@mimirtech.com>.
On 12 January 2014 19:45, Hakim Benoudjit <h....@gmail.com> wrote:
> hi,
>
> what's the correct type used to store urls, which can contain some
> encoded unicode caracters in the form '%<some-digits>'. Because, the
> string type returns an error when I try to store these urls.

Please provide more details as that should not be the case.

> Btw, I'm using a python client which gives me this error: "'ascii'
> codec can't decode byte 0xc3".

That is a different issue having to do with Python, and the proper
handling of Unicode strings. Try searching Google, or asking on a
Python list.

Regards,
Gora