lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajnish kamboj <rajnishk7.i...@gmail.com>
Subject Indexing values of different datatype under same field
Date Fri, 04 Nov 2016 03:00:24 GMT
Hi

Is it advisable to store and index values of different datatype under same
field as follows

Field field = new LongField("*region*", 10L, Field.Store.YES);
doc.add(field);
Field field1 = new StringField("*region*", "NORTH", Field.Store.YES);
doc.add(field1);

Our field "region" can have numeric and string data types.

Our query can have two patterns as under:
#1 region="NORTH"
#2 region in range 5 TO 20

Though we are able to index and retrieve desired results but,

*We could not find Lucene (5.3.1) documentation around this behavior.*
Please comment on,
1. If we can go with this behavior and what would be the performance
implication of indexing and querying different datatype under same field?
2. How the two are stored internally (i.e. different datatype under same
field)?
2. If we upgrade to new Lucene version 5.4 or to major 6.0.0, then will the
above behavior work or it may break?


Regards
Rajnish

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message