lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sidhant Aggarwal <>
Subject Which is More Efficient Way of storing Doc Values
Date Thu, 27 Apr 2017 11:16:58 GMT

I have a e-commerce search engine. In this in each document i want to store custom score of
each product. And further the score of each product would depend on in which category the
product was searched on.

So as this is part of scoring i will be storing this data as doc values. Now i have two options
to store this data:

1. I store multiple keys in each document like category_score_a = 4, category_score_b = 5
and based on the category searched i extract the corresponding field value while scoring.

2. I store all the scores in a single field as a delimited string in the document like a:4,b:5,c:6
under a single field say called category_scores and then always extract this field and parse
this string and get the score for the corresponding category.

So out of these 2 which one is more efficient way to do this?
I was just worrying that if my number of categories is too much then there will be too many
fields per document. Does that impact performance in any way?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
    • Unnamed multipart/related (inline, None, 0 bytes)
View raw message