Exception when quering for exact match (but mapping works fine for few documents)

I'm trying to index football related data and query them. I want to query
for exact match, because some fields contains lots of names and quering for
string like 'Frank Lampard' won't be very accurate. So I want use
query_string and do exact match of '"Frank Lampard"' and there I run into
troubles.

With just few documents in my type (like 50 maximum), everything runs
smoothly. But when I index few more documents, Elasticsearch gives me
following Exception:

query[filtered(+ConstantScore(:) +(goals:"frank

lampard"))->cache(_type:match)],from[0],size[10]: Query Failed [Failed to
execute main query]]; nested: IllegalStateException[field "goals" was
indexed without position data; cannot run PhraseQuery (term=frank)]; }]

My mapping in this case is very simple, just custom analyzer with truncate,
webalize, lowercase and asciifolding. I tried almost every combination of
index_options and term_vector, but nothing seems to work.

I run following version of Elasticsearch on my MacbookPro:
{
"ok" : true,
"status" : 200,
"name" : "Omega I",
"version" : {
"number" : "0.90.3",
"build_hash" : "5c38d6076448b899d758f29443329571e2522410",
"build_timestamp" : "2013-08-06T13:18:31Z",
"build_snapshot" : false,
"lucene_version" : "4.4"
},
"tagline" : "You Know, for Search"
}

Any suggestions?
Thanks,
Ales Kafka

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Can you provide your mapping, especially for the goal field? Better yet,
what does the mapping API return? At some point, it was indexed without
positions.

--
Ivan

On Fri, Sep 20, 2013 at 2:27 AM, Ales Kafka ales.kafka@gmail.com wrote:

I'm trying to index football related data and query them. I want to query
for exact match, because some fields contains lots of names and quering for
string like 'Frank Lampard' won't be very accurate. So I want use
query_string and do exact match of '"Frank Lampard"' and there I run into
troubles.

With just few documents in my type (like 50 maximum), everything runs
smoothly. But when I index few more documents, Elasticsearch gives me
following Exception:

query[filtered(+ConstantScore(:) +(goals:"frank

lampard"))->cache(_type:match)],from[0],size[10]: Query Failed [Failed to
execute main query]]; nested: IllegalStateException[field "goals" was
indexed without position data; cannot run PhraseQuery (term=frank)]; }]

My mapping in this case is very simple, just custom analyzer with
truncate, webalize, lowercase and asciifolding. I tried almost every
combination of index_options and term_vector, but nothing seems to work.

I run following version of Elasticsearch on my MacbookPro:
{
"ok" : true,
"status" : 200,
"name" : "Omega I",
"version" : {
"number" : "0.90.3",
"build_hash" : "5c38d6076448b899d758f29443329571e2522410",
"build_timestamp" : "2013-08-06T13:18:31Z",
"build_snapshot" : false,
"lucene_version" : "4.4"
},
"tagline" : "You Know, for Search"
}

Any suggestions?
Thanks,
Ales Kafka

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thank you for taking interest in my problem.

I tried few more things and I think I have found the reason of this
behaviour. The original mapping is just fine (few byte fields and another 7
string fields with simple analyzer and index_options set to positions).
This works fine, even when I index thousands of documents. But I originally
had other mappings in this index and some string fields had index_options
set as docs. After I index documents to these mappings, the aforementioned
problem immediatelly occurrs.

I run into same behaviour in our production server, where older version of
Elasticsearch is installed. For my case, setting index_options to positions
will help. But it's probably a nasty bug.

Dne pátek, 20. září 2013 18:07:37 UTC+2 Ivan Brusic napsal(a):

Can you provide your mapping, especially for the goal field? Better yet,
what does the mapping API return? At some point, it was indexed without
positions.

--
Ivan

On Fri, Sep 20, 2013 at 2:27 AM, Ales Kafka <ales....@gmail.com<javascript:>

wrote:

I'm trying to index football related data and query them. I want to query
for exact match, because some fields contains lots of names and quering for
string like 'Frank Lampard' won't be very accurate. So I want use
query_string and do exact match of '"Frank Lampard"' and there I run into
troubles.

With just few documents in my type (like 50 maximum), everything runs
smoothly. But when I index few more documents, Elasticsearch gives me
following Exception:

query[filtered(+ConstantScore(:) +(goals:"frank

lampard"))->cache(_type:match)],from[0],size[10]: Query Failed [Failed to
execute main query]]; nested: IllegalStateException[field "goals" was
indexed without position data; cannot run PhraseQuery (term=frank)]; }]

My mapping in this case is very simple, just custom analyzer with
truncate, webalize, lowercase and asciifolding. I tried almost every
combination of index_options and term_vector, but nothing seems to work.

I run following version of Elasticsearch on my MacbookPro:
{
"ok" : true,
"status" : 200,
"name" : "Omega I",
"version" : {
"number" : "0.90.3",
"build_hash" : "5c38d6076448b899d758f29443329571e2522410",
"build_timestamp" : "2013-08-06T13:18:31Z",
"build_snapshot" : false,
"lucene_version" : "4.4"
},
"tagline" : "You Know, for Search"
}

Any suggestions?
Thanks,
Ales Kafka

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.