Cannot search URL

I have a field mapped like this:

"linkImgUrl":{"type":"string", index:"not_analyzed"}

I've indexed a document, and set this value to, for example, this
string:

If I search by this value, I don't have this document returned.

What could be possibly wrong?
I have another such field with the same mapping, but simple string
value, and I can search the document by that value. Only URL like
string doesn't work

Thank you,
Eugene S.

you need to confirm that the mapping gets actually applied. Because
all string values are searchable per default. so, that the simple
string is 'working' does not mean that the mapping is known to ES.

Is the type correct for the mapping? is the location correct of the
file or if you use the API (you should! :)) this wouldn't be a
problem.
Also you should post the query. Are you doing a term query?

Regards,
Peter.

On 2 Dez., 05:43, Eugene Strokin eug...@strokin.info wrote:

I have a field mapped like this:

"linkImgUrl":{"type":"string", index:"not_analyzed"}

I've indexed a document, and set this value to, for example, this
string:

http://upload.wikimedia.org/wikipedia/commons/0/03/Alchemy_of_Happine...

If I search by this value, I don't have this document returned.

What could be possibly wrong?
I have another such field with the same mapping, but simple string
value, and I can search the document by that value. Only URL like
string doesn't work

Thank you,
Eugene S.

Not sure what wrong, and hard to help without an example of the most basic
things, like how do you search? Also, validate that your mapping are
actually set using get mappings. And, if things do not work, a simple
recreation works best. Here is an example that shows that it works:
gist:1430356 · GitHub.

On Fri, Dec 2, 2011 at 6:43 AM, Eugene Strokin eugene@strokin.info wrote:

I have a field mapped like this:

"linkImgUrl":{"type":"string", index:"not_analyzed"}

I've indexed a document, and set this value to, for example, this
string:

http://upload.wikimedia.org/wikipedia/commons/0/03/Alchemy_of_Happiness.png

If I search by this value, I don't have this document returned.

What could be possibly wrong?
I have another such field with the same mapping, but simple string
value, and I can search the document by that value. Only URL like
string doesn't work

Thank you,
Eugene S.

Don't know if there is a logical explanation for this, but we
encountered problems like this quite often when using capitol
letters.
Just as a guess, try converting your search string to lower case, at
least for us this solves a lot of problems.

Andrej

On 2 Dez., 05:43, Eugene Strokin eug...@strokin.info wrote:

I have a field mapped like this:

"linkImgUrl":{"type":"string", index:"not_analyzed"}

I've indexed a document, and set this value to, for example, this
string:

http://upload.wikimedia.org/wikipedia/commons/0/03/Alchemy_of_Happine...

If I search by this value, I don't have this document returned.

What could be possibly wrong?
I have another such field with the same mapping, but simple string
value, and I can search the document by that value. Only URL like
string doesn't work

Thank you,
Eugene S.

When the field is not analyzed, then you have to use the exact casing to
search against it. You can create a custom analyzer that has a keyword
tokenizer and lowercase filter to keep it from being broken down into
multiple tokens, but still lowercasing it.

On Mon, Dec 5, 2011 at 12:03 PM, Andrej Rosenheinrich <
andrej.rosenheinrich@unister.de> wrote:

Don't know if there is a logical explanation for this, but we
encountered problems like this quite often when using capitol
letters.
Just as a guess, try converting your search string to lower case, at
least for us this solves a lot of problems.

Andrej

On 2 Dez., 05:43, Eugene Strokin eug...@strokin.info wrote:

I have a field mapped like this:

"linkImgUrl":{"type":"string", index:"not_analyzed"}

I've indexed a document, and set this value to, for example, this
string:

http://upload.wikimedia.org/wikipedia/commons/0/03/Alchemy_of_Happine...

If I search by this value, I don't have this document returned.

What could be possibly wrong?
I have another such field with the same mapping, but simple string
value, and I can search the document by that value. Only URL like
string doesn't work

Thank you,
Eugene S.