I have the following object hierarchy and would like to search across all
fields. I have to store and index all fields. I am using lucene 3.6.1 with
JDK 1.6 on linux.
Patient object
- id
- first name
- last name
- dob
- AddressList(arrayList)
- addressLine1
- adressLine2
- city
- state
- country
- PhoneList (arrayList)
- number
- type
I am thinking of creating 1 document per patient object, adding fields like
id, firstName, lastName etc... to it but when it comes to adressList and
phoneList - It looks I have to seralize them as ByteArray and add to
document. Its fine - But I want to seach across the fields of these objects
as well. i.e. user could say "give a patient whose addressLine is "100 Main
street" or city:"new york"
1) How can I make these two fields indexable and store them as well?
2) If I seralize an object - will lucene be able to search inside that as
well?
Thank you so much for your help.
-rishi