You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by danny teichthal <da...@gmail.com> on 2014/05/15 16:29:35 UTC
Solr performance: multiValued filed vs separate fields
I wonder about performance difference of 2 indexing options: 1- multivalued
field 2- separate fields
The case is as follows: Each document has 100 “properties”: prop1..prop100.
The values are strings and there is no relation between different
properties. I would like to search by exact match on several properties by
known values (like ids). For example: search for all docs having
prop1=”blue” and prop6=”high”
I can choose to build the indexes in 1 of 2 ways: 1- the trivial way – 100
separate fields, 1 for each property, multiValued=false. the values are
just property values. 2- 1 field (named “properties”) multiValued=true. The
field will have 100 values: value1=”prop1:blue”.. value6=”high” etc
Is it correct to say that option1 will have much better performance in
searching? How about indexing performance?
Re: Solr performance: multiValued filed vs separate fields
Posted by rulinma <ru...@gmail.com>.
I think multiValue is copied multi values, index is bigger and query easy,
but performance may worse, but it depends on how to using.
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-performance-multiValued-filed-vs-separate-fields-tp4136121p4137289.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr performance: multiValued filed vs separate fields
Posted by Yonik Seeley <yo...@heliosearch.com>.
On Thu, May 15, 2014 at 10:29 AM, danny teichthal <da...@gmail.com> wrote:
> I wonder about performance difference of 2 indexing options: 1- multivalued
> field 2- separate fields
>
> The case is as follows: Each document has 100 “properties”: prop1..prop100.
> The values are strings and there is no relation between different
> properties. I would like to search by exact match on several properties by
> known values (like ids). For example: search for all docs having
> prop1=”blue” and prop6=”high”
>
> I can choose to build the indexes in 1 of 2 ways: 1- the trivial way – 100
> separate fields, 1 for each property, multiValued=false. the values are
> just property values. 2- 1 field (named “properties”) multiValued=true. The
> field will have 100 values: value1=”prop1:blue”.. value6=”high” etc
>
> Is it correct to say that option1 will have much better performance in
> searching? How about indexing performance?
For straight exact-match searching (matching properties) there should
be no difference. A single field should be slightly faster at
indexing.
If you need fast numeric range queries, faceting, or sortong on any
properties, you would want those as separate fields.
-Yonik
http://heliosearch.org - facet functions, subfacets, off-heap filters&fieldcache
Re: Solr performance: multiValued filed vs separate fields
Posted by Shawn Heisey <so...@elyograg.org>.
On 5/15/2014 8:29 AM, danny teichthal wrote:
> I wonder about performance difference of 2 indexing options: 1- multivalued
> field 2- separate fields
>
> The case is as follows: Each document has 100 “properties”: prop1..prop100.
> The values are strings and there is no relation between different
> properties. I would like to search by exact match on several properties by
> known values (like ids). For example: search for all docs having
> prop1=”blue” and prop6=”high”
>
> I can choose to build the indexes in 1 of 2 ways: 1- the trivial way – 100
> separate fields, 1 for each property, multiValued=false. the values are
> just property values. 2- 1 field (named “properties”) multiValued=true. The
> field will have 100 values: value1=”prop1:blue”.. value6=”high” etc
>
> Is it correct to say that option1 will have much better performance in
> searching? How about indexing performance?
I cannot say for absolute certain, but I do not believe there would be
any significant difference in indexing performance. If you have
separate fields, query performance is likely to be better, because fewer
terms will need to be examined. The index might be a little bit bigger
with multiple fields.
Thanks,
Shawn