You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ryan O'Hara <oh...@genome.chop.edu> on 2006/07/26 16:33:15 UTC

Can Field types affect search speed?

Currently, I have field "DOC" which is indexed, but not stored and  
not compressed.  This is the field that users query.  I also have a  
field "SYM" which is indexed and stored, but not compressed.  For  
every document returned in a query, I need its symbol.  Can field  
types (indexed vs. not indexed, compressed vs. not compressed, etc.)  
affect search speed?  If so, are my settings the optimal settings for  
my purposes, or is there a better combination of field settings?

On another note, does anyone know how to return the field values  
only, rather than the whole document?  This, I believe, would speed  
things up, but I haven't been able to find how to do it.

Thanks for the time and help,

Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Can Field types affect search speed?

Posted by Erick Erickson <er...@gmail.com>.
nope, haven't had to worry about it yet <G>...

Erick

Re: Can Field types affect search speed?

Posted by Ryan O'Hara <oh...@genome.chop.edu>.
I'm not using a Hits object.  I'm using a HitCollector.  I was just  
curious about whether Field settings could affect search  
performance.  Any ideas?

Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Can Field types affect search speed?

Posted by Erick Erickson <er...@gmail.com>.
Are you using a Hits object to iterate over the results? If so, you are
re-executing the query every 100 docs or so under the covers, and if there
are many results, this is very bad.

If this is the case, you want to use a TopDocs or HitCollector to iterate
through the entire result set.

Of course, this could be entirely irrelevant to your problem......

My experience has been that "fetching the doc" isn't a problem speed-wise,
but I have no idea whether your app is different enough from mine to matter
in this regard.

Best
Erick