Results 1 to 5 of 5
Thread: Indexing an associative array
- 06-03-2011, 07:51 AM #1
Member
- Join Date
- Jun 2011
- Location
- India
- Posts
- 10
- Rep Power
- 0
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 ?
- 06-06-2011, 09:09 AM #2
Hi.
You didn't point about your model. Is that data one model or that is difference data.
I.e. if you use first approach you will make four difference Documents. But in second approach you will use only one Document.
Of course for search faster will be second approach. But I can't say exactly, because I don't know your architecture.Skype: petrarsentev
http://TrackStudio.com
- 06-06-2011, 09:16 AM #3
Member
- Join Date
- Jun 2011
- Location
- India
- Posts
- 10
- Rep Power
- 0
I didn't get you regarding the model I'm using.
Does it mean what I'm indexing and searching on ?
- 06-06-2011, 09:21 AM #4
I'm sorry I don't understand you.
You asked about performance Lucene for two approaches in create index.
I answered that second approach faster then first.Skype: petrarsentev
http://TrackStudio.com
- 06-06-2011, 09:24 AM #5
Member
- Join Date
- Jun 2011
- Location
- India
- Posts
- 10
- Rep Power
- 0
Similar Threads
-
html indexing
By adbawany in forum LuceneReplies: 0Last Post: 01-22-2011, 03:23 PM -
re-indexing particular fields
By caballo7 in forum LuceneReplies: 0Last Post: 06-08-2010, 06:46 AM -
Indexing XML using lucene
By peliukasss in forum LuceneReplies: 0Last Post: 03-28-2010, 10:20 PM -
[SOLVED] indexing an element in an array help!
By anthonym2121 in forum New To JavaReplies: 1Last Post: 04-03-2009, 06:21 PM -
Associative Arrays
By mayhewj7 in forum New To JavaReplies: 2Last Post: 02-28-2009, 09:32 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks