Maybe put them in a single string field (or any other field type that is not 
analyzed -- certainly not text) using some character separator that will 
connect them, but won't confuse the Solr query parser?

So maybe you start out with key value pairs of

Key1 value1
Key2 value2
Key3 value3

Preprocess them for indexing, and then index (and search) for them as, for 
example, 

Key1$value1
Key2$value2
Key3$value3

(You could also store their individual values in a separate field, of course).

JRJ

-----Original Message-----
From: jame vaalet [mailto:jamevaa...@gmail.com] 
Sent: Monday, October 24, 2011 6:42 AM
To: solr-user@lucene.apache.org
Subject: indexing key value pair into lucene solr index

hi,
in my use case i have list of key value pairs in each document object, if i
index them as separate index fields then in the result doc object i will get
two arrays corresponding to my keys and values. The problem i face here is
that there wont be any mapping between those keys and values.

do we have any easy to index these data in solr ? thanks in advance ...

-- 

-JAME

Reply via email to