Re: Display pattern of child entity records as row

2015-07-06 Thread Mikhail Khludnev
Hello,

We just published a few advices regarding indexing data for Solr (and
whatever).
http://blog.griddynamics.com/2015/07/how-to-import-structured-data-into-solr.html.
Indexing blocks by DIH is possible with specifying  child=”true”

.


On Mon, Jul 6, 2015 at 9:18 PM, SHANKAR REDDY 
wrote:

> Upayavira,
> Thanks for the update. I am using Data Import handler for MySQL as below.
>
>
> 
>  driver="com.mysql.jdbc.Driver"
> url="jdbc:mysql://XX:3306/X"
> user="XX"
> password="XXX" />
> 
> 
> 
> id
> 
>  name="display_value_txt" />
>  />
>  name="report_owner_txt" />
>  />
>  name="report_types_id_txt" />
>
> 
>  >
> 
> 
> 
> 
> 
> 
> 
>
>
> Please suggest.
>
>
> -Sankara
>
>
> On Sun, Jul 5, 2015 at 11:52 PM, Upayavira  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:
> >
> > 
> >   0BICA_PROBLEM_AUTHOR
> >   parent
> >   ...
> >   
> >0RS_AUTHOR
> >Author
> >CHA
> >child
> >   
> >   ...
> > 
> >
> > 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
> >
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics





Re: Display pattern of child entity records as row

2015-07-06 Thread SHANKAR REDDY
Upayavira,
Thanks for the update. I am using Data Import handler for MySQL as below.







id


















Please suggest.


-Sankara


On Sun, Jul 5, 2015 at 11:52 PM, Upayavira  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:
>
> 
>   0BICA_PROBLEM_AUTHOR
>   parent
>   ...
>   
>0RS_AUTHOR
>Author
>CHA
>child
>   
>   ...
> 
>
> 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
>


Re: Display pattern of child entity records as row

2015-07-05 Thread Upayavira
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:


  0BICA_PROBLEM_AUTHOR
  parent
  ...
  
   0RS_AUTHOR
   Author
   CHA
   child
  
  ...


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