Indexing an associative array
I want to index an associative array which is as shown below
A=10238121
B=4700-12-31
C=123
D=ear
where A,B,C,D are keys with their respective values.
Now there are 2 approaches towards indexing it,
Approach 1
--------------
In a Lucene document, I create 2 fields with names "key" and "values" and I index A,B,C,D into "key" and their corresponding values into "values" field.
Approach 2
--------------
In a Lucene document, I create 4 fields with their names as A,B,C,D and their values as 10238121,...,ear.
Which approach of these two should be used. Will difference in approach affect the search results ?