Re: Strange behavior of term queries with StoredFields - 4.1

2013-02-12 Thread Ramprakash Ramamoorthy
On Tue, Feb 12, 2013 at 9:17 PM, Ian Lea wrote: > I think you can store field "x" using byte[] as one Field and index it > using String as another Field. Or define your own FieldType and use > the Field(String name, byte[] value, FieldType type) constructor. Or > is that where you're getting an

Re: Strange behavior of term queries with StoredFields - 4.1

2013-02-12 Thread Ian Lea
I think you can store field "x" using byte[] as one Field and index it using String as another Field. Or define your own FieldType and use the Field(String name, byte[] value, FieldType type) constructor. Or is that where you're getting an Exception? How big is your index, or how small are your

Re: Strange behavior of term queries with StoredFields - 4.1

2013-02-12 Thread Ramprakash Ramamoorthy
Ian and et al, Just a doubt. Now that I have to index and store(disk space is a constraint here). I have identified that storing as byte[] helps save some disk. But it isn't possible to index a byte[], am getting an exception when the field to be indexed is a byte[]. So how do I go

Re: Strange behavior of term queries with StoredFields - 4.1

2013-02-11 Thread Ian Lea
Yes, that looks fine. As far as I'm aware the compression is low level and transparent to user code. -- Ian. On Mon, Feb 11, 2013 at 2:59 PM, Ramprakash Ramamoorthy wrote: > On Mon, Feb 11, 2013 at 7:10 PM, Ian Lea wrote: > >> StoredField does indeed only store the field, not index it. >> Ma

Re: Strange behavior of term queries with StoredFields - 4.1

2013-02-11 Thread Ramprakash Ramamoorthy
On Mon, Feb 11, 2013 at 7:10 PM, Ian Lea wrote: > StoredField does indeed only store the field, not index it. > MatchAllDocs will find it because, by definition, it matches all docs. > But other queries won't. > That was pretty clear Ian. Thanks a lot. > > Not sure what you mean when you say y

Re: Strange behavior of term queries with StoredFields - 4.1

2013-02-11 Thread Ian Lea
StoredField does indeed only store the field, not index it. MatchAllDocs will find it because, by definition, it matches all docs. But other queries won't. Not sure what you mean when you say you are particular about stored fields. If you need to get it back from the index, store it. If you don