Yes Will, You are right. But i dont use "status" field for sorting. i have other fields that is being used for sorting specifically. And so i dont face any issues in sorting as of now.
-- Kumaran R On Tue, Oct 27, 2015 at 7:20 PM, will <wmartin...@gmail.com> wrote: > Kumaran - > > Aren't you creating an unworkable scenario for sorting? > > -will > > On 10/27/15 5:49 AM, Kumaran Ramasubramanian wrote: > >> Hi All, >> >> i have indexed module wise data in same index. In this case, we index >> two >> types of field in same name in two different document like this. >> >> *document1:* >> >> module:1 >>> status:4 ( as LongField ) >>> >>> *code:* >> >> long longValue=Long.parseLong(value); >>> LongField field=new LongField(f >>> ield >>> Name,longValue, Field.Store.YES); >>> document.add(field); >>> >>> >> *document2:* >> >> module:2 >>> status:open ( as Field ) >>> >> *code:* >> >> >>> Field field = new Field( >>> f >>> >>> ield >>> Name, value, (Field.Store) stored, (Field.Index) indexType); >>> >> document.add(field); >> >> >> >>> >>> There are around 50lakh documents in my index which has these kind of >> mixed >> type of fields >> >> when i query like status:4 or status:open, it is working for most of the >> documents except one or two documents. >> >> Not able to reproduce the same in other indexes. So i want confirm whether >> it is supported to have both Field & LongField with same field name in >> same >> index. And also Please suggest me any articles discussing this kind of >> problem. >> >> Thanks :-) >> >> Related links: >> http://www.gossamer-threads.com/lists/lucene/java-user/109530 >> >> -- >> ** >> Kumaran R >> >> >