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 Tea Yu <te...@netvigator.com> on 2004/10/04 03:45:37 UTC

Re: multifield-boolean vs singlefield-enum query performance

Hi,

For the following implementations:

1) storing boolean strings in fields X and Y separately
2) storing the same info in a field XY as 3 enums: X, Y, B, N meaning only X
is True, only Y is True, both are True or both are False

Is there significant performance gain when we substitute "X:T OR Y:T" by
"XY:B", while significant loss in "X:T" by "XY:X OR XY:B"?  Or are they
negligible?

Thanks!

Tea


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


Re: multifield-boolean vs singlefield-enum query performance

Posted by Doug Cutting <cu...@apache.org>.
Tea Yu wrote:
> For the following implementations:
> 
> 1) storing boolean strings in fields X and Y separately
> 2) storing the same info in a field XY as 3 enums: X, Y, B, N meaning only X
> is True, only Y is True, both are True or both are False
> 
> Is there significant performance gain when we substitute "X:T OR Y:T" by
> "XY:B", while significant loss in "X:T" by "XY:X OR XY:B"?  Or are they
> negligible?

As with most performance questions, it's best to try both and measure! 
It depends on the size of your index, the relative frequencies of X and 
Y, etc.

Doug

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