As promised, once I built the infrastructure, adding exciting features
becomes really simple. Here is a breakdown of some features added recently
(on top of the facets and custom_score query):
Script Fields:
The ability to return script evaluation per hit of fields that are not
stored. This make sense (as any other scripted field on numeric or
not_analyzed fields). Issue is here: http://github.com/elasticsearch/elasticsearch/issues/221. For example:
Are script filters applied after the fact? (after the matches have
been scored and retrieved? If so, how does one deal with a situation
where N matches are needed at the end, but the filter(s) may end up
removing some unknown number of them? Does one simply have to get m x
N hits and hope that N or more hits are left after the filters?
Can you explain what statistical and histogram facets are? The
example for the histogram shows, I think, that you can derive new
facet values from partial field values (e.g. from a date field you can
extract "minuteOfHour" and that becomes the new facet value)... but I
think I'm missing something here, otherwise you wouldn't call them
"histogram" facets?
Similarly, what makes statistical facets statistical? I can't figure
it out from the example in the issue, which I think shows that you can
create a new facet value from other fields.
I think all examples I saw for the new "script" stuff involved
numeric or date fields. Can they be used with string fields, and if
so, can you give some examples? For example, if I have 2 fields,
"username" and "id", and they have 1:1 mapping, could I use the
"script" functionality to end up with facets of " "
format?
As promised, once I built the infrastructure, adding exciting features
becomes really simple. Here is a breakdown of some features added recently
(on top of the facets and custom_score query):
Are script filters applied after the fact? (after the matches have
been scored and retrieved? If so, how does one deal with a situation
where N matches are needed at the end, but the filter(s) may end up
removing some unknown number of them? Does one simply have to get m x
N hits and hope that N or more hits are left after the filters?
Script filters work like any other filter, term filter / range filter and so
on. Its basically a Lucene Filer implementation.
Can you explain what statistical and histogram facets are? The
example for the histogram shows, I think, that you can derive new
facet values from partial field values (e.g. from a date field you can
extract "minuteOfHour" and that becomes the new facet value)... but I
think I'm missing something here, otherwise you wouldn't call them
"histogram" facets?
Similarly, what makes statistical facets statistical? I can't figure
it out from the example in the issue, which I think shows that you can
create a new facet value from other fields.
I think all examples I saw for the new "script" stuff involved
numeric or date fields. Can they be used with string fields, and if
so, can you give some examples? For example, if I have 2 fields,
"username" and "id", and they have 1:1 mapping, could I use the
"script" functionality to end up with facets of " "
format?
Yes, they can be used with string fields, but only where it makes sense. For
example, script fields can return a concatenation of the "username" and "id"
if you want. For facets, you have the terms facet for strings, which has
nothing to do with scripts, other than that, in the statistical and
historical facets, the return values must be numbers (they work on
numbers) but it does not mean you can't use the string fields in your
script.
As promised, once I built the infrastructure, adding exciting features
becomes really simple. Here is a breakdown of some features added
recently
(on top of the facets and custom_score query):
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.