lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Which is More Efficient Way of storing Doc Values
Date Thu, 27 Apr 2017 15:07:03 GMT
What kind of lead time to your production system? Erik Hatcher is
doing some really exciting things with Payloads. The idea here is that
you have one field where the store ID has a "payload", and you use
that in scoring. Here's the (currently painful) hard way to do this.
While more work on your part it'll would be much more efficient than
either of the alternatives you mention:

If you don't want to go there, then <1> is much better than <2>,
assuming the number of fields stays below, say, 1,000 or so.

The Solr JIRA Erik is working on:


On Thu, Apr 27, 2017 at 4:16 AM, Sidhant Aggarwal <> wrote:
> Hi,
> 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?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message