Re: Getting only the Ids, not the whole documents.

2007-08-03 Thread Mike Klaas
You still have a disk seek per doc if the index can't fit in memory (usually more costly than reading the fields) . Why not use FieldCache? -Mike On 2-Aug-07, at 5:41 PM, Mark Miller wrote: If you are just retrieving your custom id and you have more stored fields (and they are not tiny) yo

Re: Getting only the Ids, not the whole documents.

2007-08-02 Thread Mark Miller
If you are just retrieving your custom id and you have more stored fields (and they are not tiny) you certainly do want to use a field selector. I would suggest SetBasedFieldSelector. - Mark testn wrote: Hi, Why don't you consider to use FieldSelector? LoadFirstFieldSelector has an ability t

Re: Getting only the Ids, not the whole documents.

2007-08-02 Thread Daniel Noll
On Thursday 02 August 2007 19:28:48 Mohammad Norouzi wrote: > you should not store them in an Array structure since they will take up the > memory. > the BitSet is the best structure to store them You can't store strings in a BitSet. What I would do is return a List but make a custom subclass of

Re: Getting only the Ids, not the whole documents.

2007-08-02 Thread testn
Hi, Why don't you consider to use FieldSelector? LoadFirstFieldSelector has an ability to help you load only the first field in the document without loading all the fields. After that, you can keep the whole document if you like. It should help improve performance better. is_maximum wrote: >

Re: Getting only the Ids, not the whole documents.

2007-08-02 Thread Mohammad Norouzi
ilChhabra > > > > > > -Original Message- > > From: makkhar [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 02, 2007 2:26 PM > > To: java-user@lucene.apache.org > > Subject: Getting only the Ids, not the whole documents. > > > > > &g

Re: Getting only the Ids, not the whole documents.

2007-08-02 Thread Mohammad Norouzi
yes it decrease the performance but the only solution. I've spent many weeks to find best way to retrive my own IDs but find this way as last one now I am storing the ids in a BitSet structure and it's fast enough public void collect(...){ idBitSet.set(Integer.valueOf(searcher.doc(id).get("MyOwnI

RE: Getting only the Ids, not the whole documents.

2007-08-02 Thread makkhar
riginal Message- > From: makkhar [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 02, 2007 2:26 PM > To: java-user@lucene.apache.org > Subject: Getting only the Ids, not the whole documents. > > > Hi all, > >Can I get just a list of document Ids given a search

Re: Getting only the Ids, not the whole documents.

2007-08-02 Thread makkhar
Hi, The solution you suggested will definitely work but will definitely slow down my search by an order of magnitude. The problem I am trying to solve is performance, thats why I need the collection of IDs and not the whole documents. - thanks for the prompt reply. is_maximum wrote: > > y

RE: Getting only the Ids, not the whole documents.

2007-08-02 Thread Chhabra, Kapil
. Regards, kapilChhabra -Original Message- From: makkhar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 2:26 PM To: java-user@lucene.apache.org Subject: Getting only the Ids, not the whole documents. Hi all, Can I get just a list of document Ids given a search criteria ? To

Re: Getting only the Ids, not the whole documents.

2007-08-02 Thread Mohammad Norouzi
yes if you extend your class from HitCollector and override the collect() mthod with following signature you can get IDs public void collect(int id, float score) On 8/2/07, makkhar <[EMAIL PROTECTED]> wrote: > > > Hi all, > >Can I get just a list of document Ids given a search criteria ? To >

Getting only the Ids, not the whole documents.

2007-08-02 Thread makkhar
Hi all, Can I get just a list of document Ids given a search criteria ? To elaborate here is my situation: I store 2 contracts in the file system index each with some parameterName and Value. Given a search criterion - (paramValue='draft'). I need to get just an ArrayList of Strings conta