lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Gazzarini <gxs...@gmail.com>
Subject Re: query the data contain key value
Date Wed, 15 Mar 2017 09:26:05 GMT
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
>


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