Index-time boosting a not_analyzed field


(Matt Hanson) #1

I'm currently looking to upgrade from ES 0.19.8 to 0.90.7 and I'm having an
issue with a bit of code that used to work when trying to store a document
with an index-time boost.

I think I've managed to distil the issue down to some reproducible steps
that works on 0.19.8 but not on 0.90.7:

Against 0.19.8: http://pastebin.com/a3qcSzwt

And the same against 0.90.7: http://pastebin.com/gUqL35qx

As you can see, the index creation sets the field 'boostable_str' with
index as not_analyzed and omit_norms to false which I believe should mean
it is indexed and doesn't omit norms yet the exception states that one of
those conditions is not being met. The mapping check shows in the newer
version of ES that omit_norms is true, not false which is what should have
been configured.

We specifically need the field set to not_analyzed as we're using it for
faceting and exact matching so we need the literal, un-analyzed values.

Am I missing something fundamental in what I'm asking ES to do now (which
has historically worked for us) or is there a bug?

--
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.


(Ivan Brusic) #2

The default index_options for not_analyzed fields is "docs", as the output
can confirm. Try changing it to "freqs" on fields that need to be boosted.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html

On Wed, Nov 13, 2013 at 7:38 AM, Matt Hanson <
matthew.hanson@predictiveintent.com> wrote:

I'm currently looking to upgrade from ES 0.19.8 to 0.90.7 and I'm having
an issue with a bit of code that used to work when trying to store a
document with an index-time boost.

I think I've managed to distil the issue down to some reproducible steps
that works on 0.19.8 but not on 0.90.7:

Against 0.19.8: http://pastebin.com/a3qcSzwt

And the same against 0.90.7: http://pastebin.com/gUqL35qx

As you can see, the index creation sets the field 'boostable_str' with
index as not_analyzed and omit_norms to false which I believe should mean
it is indexed and doesn't omit norms yet the exception states that one of
those conditions is not being met. The mapping check shows in the newer
version of ES that omit_norms is true, not false which is what should have
been configured.

We specifically need the field set to not_analyzed as we're using it for
faceting and exact matching so we need the literal, un-analyzed values.

Am I missing something fundamental in what I'm asking ES to do now (which
has historically worked for us) or is there a bug?

--
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.


(system) #3