Discussion:
field “title” was indexed without position data; cannot run PhraseQuery
Eugene
2013-10-14 21:03:30 UTC
Permalink
I have an index in ElasticSearch with the following mapping:

mappings: {
feed: {
properties: {
html_url: {
index: not_analyzed
omit_norms: true
index_options: docs
type: string
}
title: {
index_options: offsets
type: string
}
created: {
store: true
format: yyyy-MM-dd HH:mm:ss
type: date
}
description: {
type: string
}
}
}
getting the following error when performing phrase search ("video games"):

IllegalStateException[field \"title\" was indexed without position data;
cannot run PhraseQuery (term=video)];

Single word searches work fine. Tried "index_options: positions" as well but
with no luck. Title field contains text in multiple languages, sometimes
empty. Interesting that it seems to fail randomly, for example it would fail
with 200K documents or 800K using the same dataset. Is there a reason some
titles wouldn't get indexed with positions?

Elastic search version 0.90.5



--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/field-title-was-indexed-without-position-data-cannot-run-PhraseQuery-tp4042524.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.
--
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-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
simonw
2013-10-14 21:13:06 UTC
Permalink
for phrase queries you need "index_options : positions" but you can't
change it after the fact. You need to reindex and likely create a new
mapping / index

simon
Post by Eugene
mappings: {
feed: {
properties: {
html_url: {
index: not_analyzed
omit_norms: true
index_options: docs
type: string
}
title: {
index_options: offsets
type: string
}
created: {
store: true
format: yyyy-MM-dd HH:mm:ss
type: date
}
description: {
type: string
}
}
}
IllegalStateException[field \"title\" was indexed without position data;
cannot run PhraseQuery (term=video)];
Single word searches work fine. Tried "index_options: positions" as well but
with no luck. Title field contains text in multiple languages, sometimes
empty. Interesting that it seems to fail randomly, for example it would fail
with 200K documents or 800K using the same dataset. Is there a reason some
titles wouldn't get indexed with positions?
Elastic search version 0.90.5
--
http://elasticsearch-users.115913.n3.nabble.com/field-title-was-indexed-without-position-data-cannot-run-PhraseQuery-tp4042524.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.
--
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-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Eugene
2013-10-14 21:16:52 UTC
Permalink
Thank you for your answer. With each test i delete index and re-create it
with the above mappings and then re-index the whole dataset but it still
randomly fails. Nothing in the logs too...





--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/field-title-was-indexed-without-position-data-cannot-run-PhraseQuery-tp4042524p4042527.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.
--
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-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Loading...