What I would like to do is to search for the values of the fields that changed, in other words: find the values of FIELD where FIELD_isChanged = true.
I tried:
when the search works, I don't want to see the entire doc, I want only the fields that matched the query. Usually, I would sort the fields I want to see in "_source", but here I don't know beforehand the names of the fields that will match, only that there FIELD_isChange is "true". Is there a way to dynamicly add field to _source? And how about using wildcard in the field name in _source?
May be. I don't know the use case but according to what you described, you are searching for specific fields. You said that you don't want to see other fields if I understood correctly.
You are right, this is what I want to achieve.
Basicly: SELECT FIELD1_VALUE WHERE FIELD2 = SOMEVALUE
or in this example: get all fieldValue where field_isChanged = true.
Is there an easy way to do that?
I want to point out that, if possible, I would like to search for a field with wildcard, if I don't know the filed name in advance, for example:
get all FIELDValue where FIELDNAME_isChanged = true, and FIELD can be specific field or all fields that their respective FIELD_isChanged that matches the query. Can this wildcard style search can be done or will I need to search for specific field everytime?
But the idea of using field and adding attributes to the mapping is intriguing. Can I just add to a value a sub field of isChanged and solve the whole thing by searching for: fieldVal where field.ischanged = true (in the same way one adds raw:keyword to a field)?
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.