Using 0.16.2, I have a type that contains a field of type long, but I am
having difficulty writing a query against it. The field name is orgId, and
always contains an integer, the following queries produce no results:
I'm sure this is such an easy answer, but I can't quite figure it out. It
looks similar to this gist: https://gist.github.com/737631, but the
solutions there don't work. If it isn't a simple problem, I'll try to gist a
recreation tomorrow...
On Wednesday, June 8, 2011 at 5:04 AM, Adam Creeger wrote:
Hi,
Using 0.16.2, I have a type that contains a field of type long, but I am having difficulty writing a query against it. The field name is orgId, and always contains an integer, the following queries produce no results:
I'm sure this is such an easy answer, but I can't quite figure it out. It looks similar to this gist: gist:737631 · GitHub, but the solutions there don't work. If it isn't a simple problem, I'll try to gist a recreation tomorrow...
This was being caused by the orgId field being mapped in one type as a
string, and in another type (same index) as a long. Does that make sense?
Would it be possible to prevent/warn when you attempt to have 2 different
mappings for the same property in one index?
On Wednesday, June 8, 2011 at 5:04 AM, Adam Creeger wrote:
Hi,
Using 0.16.2, I have a type that contains a field of type long, but I am
having difficulty writing a query against it. The field name is orgId, and
always contains an integer, the following queries produce no results:
I'm sure this is such an easy answer, but I can't quite figure it out. It
looks similar to this gist: https://gist.github.com/737631, but the
solutions there don't work. If it isn't a simple problem, I'll try to gist a
recreation tomorrow...
Warning is a possible good idea. In general, you can work around it by explicitly saying which type field you want to search on (like type1.field1). Its similar to the problem mongodb has, where you can basically do whatever you want with types in documents, but you really don't want to mix it.
On Thursday, June 9, 2011 at 4:34 AM, Adam Creeger wrote:
Hi Shay,
This was being caused by the orgId field being mapped in one type as a string, and in another type (same index) as a long. Does that make sense? Would it be possible to prevent/warn when you attempt to have 2 different mappings for the same property in one index?
On Wednesday, June 8, 2011 at 5:04 AM, Adam Creeger wrote:
Hi,
Using 0.16.2, I have a type that contains a field of type long, but I am having difficulty writing a query against it. The field name is orgId, and always contains an integer, the following queries produce no results:
I'm sure this is such an easy answer, but I can't quite figure it out. It looks similar to this gist: gist:737631 · GitHub, but the solutions there don't work. If it isn't a simple problem, I'll try to gist a recreation tomorrow...
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.