I have an integer field in my index which I would like to be
multivalued.
I am using the Java API, and I prefer to use
the .setSource(Map<String,Object>) method of setting the source.
In the case of a multivalued field, what object should I pass? Will a
List or Set of Integers work, or is it expecting an Array?
What kind of a collection should I expect when reading back one of
these documents? Is it correct to assume that instances with one value
will be returned as an Integer while instances with multiple values
will be returned as some kind of a collection or array?
I have an integer field in my index which I would like to be
multivalued.
I am using the Java API, and I prefer to use
the .setSource(Map<String,Object>) method of setting the source.
In the case of a multivalued field, what object should I pass? Will a
List or Set of Integers work, or is it expecting an Array?
What kind of a collection should I expect when reading back one of
these documents? Is it correct to assume that instances with one value
will be returned as an Integer while instances with multiple values
will be returned as some kind of a collection or array?
It is interesting to see that there is now support for Iterable. In
the past, you told me the limitation was because of JSON, which I did
not understand at the time. Then I understood that the idea was to
have the REST API identical to the Java API in terms of types
supported.
On Mon, Jan 9, 2012 at 1:08 PM, Shay Banon kimchy@gmail.com wrote:
I have an integer field in my index which I would like to be
multivalued.
I am using the Java API, and I prefer to use
the .setSource(Map<String,Object>) method of setting the source.
In the case of a multivalued field, what object should I pass? Will a
List or Set of Integers work, or is it expecting an Array?
What kind of a collection should I expect when reading back one of
these documents? Is it correct to assume that instances with one value
will be returned as an Integer while instances with multiple values
will be returned as some kind of a collection or array?
On Tue, Jan 10, 2012 at 2:01 AM, Ivan Brusic ivan@brusic.com wrote:
It is interesting to see that there is now support for Iterable. In
the past, you told me the limitation was because of JSON, which I did
not understand at the time. Then I understood that the idea was to
have the REST API identical to the Java API in terms of types
supported.
On Mon, Jan 9, 2012 at 1:08 PM, Shay Banon kimchy@gmail.com wrote:
I have an integer field in my index which I would like to be
multivalued.
I am using the Java API, and I prefer to use
the .setSource(Map<String,Object>) method of setting the source.
In the case of a multivalued field, what object should I pass? Will a
List or Set of Integers work, or is it expecting an Array?
What kind of a collection should I expect when reading back one of
these documents? Is it correct to assume that instances with one value
will be returned as an Integer while instances with multiple values
will be returned as some kind of a collection or array?
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.