Upayavira, Thanks for the update. I am using Data Import handler for MySQL as below.
<dataConfig> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://XXXXXXXXXX:3306/XXXXX" user="XXXXXX" password="XXXXXXX" /> <document> <entity name="header" query="select * from l_report_header_data where status_master_id = 0"> <field column="REPORT_HEADER_ID" name="id"/> <uniqueKey>id</uniqueKey> <!--- Header Data --> <field column="DISPLAY_VALUE" name="display_value_txt" /> <field column="DESCRIPTION" name="description_txt" /> <field column="REPORT_OWNER" name="report_owner_txt" /> <field column="DATA_SOURCE" name="data_source_txt" /> <field column="REPORT_TYPES_ID" name="report_types_id_txt" /> <!--detail entity --> <entity name="detail" query="select * from l_report_detail_data where REPORT_HEADER_ID = '${header.REPORT_HEADER_ID}'" > <field column="IOBJNM" name="iobjnm_txt" /> <field column="TXTLG" name="txtlg_txt" /> <field column="IOBJTP" name="iobjtp_txt" /> </entity> </entity> </document> </dataConfig> Please suggest. -Sankara On Sun, Jul 5, 2015 at 11:52 PM, Upayavira <u...@odoko.co.uk> wrote: > It looks like you are indexing the detail_txt fields as multivalued. > Perhaps you could index them as parent/child documents, and use block > joins and the expand component to retrieve them. > > You can index the doc as: > > <doc> > <field name="id">0BICA_PROBLEM_AUTHOR</field> > <field name="type">parent</field> > ... > <doc> > <field name="id">0RS_AUTHOR</field> > <field name="TXTLG">Author</field> > <field name="IOBJTP">CHA</field> > <field name="type">child</field> > </doc> > <doc>...</doc> > </doc> > > If you want to query the parent docs, just query as normal, and add > expand=true to see your child docs in your results (lower down). Or, use > the {!parent} or {!child} queries to select documents based upon > parent/child relationships. > > Upayavira > > On Mon, Jul 6, 2015, at 04:41 AM, SHANKAR REDDY wrote: > > Team, > > I have a requirement like getting the list of the child tables along > > with > > parent records as the below pattern. > > > > "id":"0BICA_PROBLEM_AUTHOR", > > "description_txt":[""], > > "display_value_txt":["Analyser : Problems/Category/Author"], > > "report_types_id_txt":["1"], > > "report_categories_id_txt":["30585"], > > "category_name_txt":["0RS_RPODS"], > > icon_url_txt":["images/icon_report_crystal.png"] > > "detail_txt":[{"IOBJNM": "0RS_AUTHOR","TXTLG":"Author","IOBJTP":"CHA"}, > > {"IOBJNM": "0RS_CCAT","TXTLG":" CheckCategory (inte","IOBJTP":" CHA"}, > > {"IOBJNM": "0RS_PRIORTY","TXTLG":"Priority CHA","IOBJTP":""}, > > {"IOBJNM": "PRIOSEL","TXTLG":"Priority Selection","IOBJTP":"KFG""}] > > } > > > > From the above detail_txt child entity ( Child Table). With the current > > and > > default implementation, I am getting the response as below. > > > > > > { > > "data_source_txt":["0RS_RPOD"], > > "id":"0BICA_PROBLEM_AUTHOR", > > "description_txt":[""], > > "display_value_txt":["Analyser : Problems/Category/Author"], > > "report_types_id_txt":["1"], > > "report_categories_id_txt":["30585"], > > "category_name_txt":["0RS_RPODS"], > > "icon_url_txt":["images/icon_report_crystal.png"], > > "report_type_display_value_txt":["Bex"], > > "iobjtp_txt":["CHA", > > "CHA", > > "CHA", > > "KFG"], > > "txtlg_txt":["Author", > > "CheckCategory (inte", > > "Priority", > > "Priority Selection"], > > "iobjnm_txt":["0RS_AUTHOR", > > "0RS_CCAT", > > "0RS_PRIORTY", > > "PRIOSEL"], > > "_version_":1505820339930660864} > > > > As seen above I am getting the array of columns for each of fields > > instead > > of each row in the entity as a block. > > Please provide your suggestions on this. I am using latest version of > > solr > > APACHE SOLR™ 5.2.1 > > > > Please provide your suggestion to meet the requirement. > > > > -Shankar >