Solr doesn't know about "null" values. Using a schema which declares all those fields (id, eventA, eventB, eventC) and indexing those 2 documents

1,eventA=2,eventC=3
2,eventB=1,eventA=1

You already get a situation "similar" to what you want. I said "Similar" because you won't have any null value: a given field value for a given document won't exist at all:

 * ID 1: A=2, C=3
 * ID 2: A=1,B=1

If I misunderstood the question, please expand (from a functional point of view) what you want to achieve.

Best,
Andrea

On 15/03/17 09:44, tkg_cangkul wrote:
Hi, i have data sample to index it into solr.
below is the format of my sample data :

id,field1,field2
1,eventA=2,eventC=3
2,eventB=1,eventA=1

how can i query or indexing that data format in solr to get the result like this :

id,eventA,eventB,eventC
1,2,null,3
2,1,1,null

is there any way to do that?

pls help


Reply via email to