You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Lee Carroll <le...@googlemail.com> on 2013/08/07 18:10:31 UTC
DIH Problem: create multiple docs from a single entity
Hi
I've 2 tables with the following data
table 1
id treatment_list
1 a,b
2 b,c
table 2
treatment id, name
a name1
b name 2
c name 3
Using DIH can you create an index of the form
id-treatment-id name
1a name1
1b name2
2b name2
2c name3
In short can I splt the comma separated field and process each as an
entity. From the docs and the wiki I can't see anything obvious.
I feel I'm missing something easier here. (Note its not my data so can't do
anything with the dodgy csv field )
Re: DIH Problem: create multiple docs from a single entity
Posted by Raymond Wiker <rw...@gmail.com>.
On Aug 7, 2013, at 18:10 , Lee Carroll <le...@googlemail.com> wrote:
> Hi
>
> I've 2 tables with the following data
>
> table 1
> id treatment_list
> 1 a,b
> 2 b,c
>
> table 2
> treatment id, name
> a name1
> b name 2
> c name 3
>
> Using DIH can you create an index of the form
>
> id-treatment-id name
> 1a name1
> 1b name2
> 2b name2
> 2c name3
>
> In short can I splt the comma separated field and process each as an
> entity. From the docs and the wiki I can't see anything obvious.
>
> I feel I'm missing something easier here. (Note its not my data so can't do
> anything with the dodgy csv field )
I think this is an SQL problem, rather than a DIH one. A quick google shows several hits for splitting a string in SQL; I expect that it should be possible to come up with something that fits your purpose.
Re: DIH Problem: create multiple docs from a single entity
Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Hello Lee,
Unfortunately no. It's possible to read csv field by
http://wiki.apache.org/solr/DataImportHandler#FieldReaderDataSource but
there is no csv like EntityProcessor, which can broke line on entities.
Transformers can not emit new entities.
On Wed, Aug 7, 2013 at 8:10 PM, Lee Carroll <le...@googlemail.com>wrote:
> Hi
>
> I've 2 tables with the following data
>
> table 1
> id treatment_list
> 1 a,b
> 2 b,c
>
> table 2
> treatment id, name
> a name1
> b name 2
> c name 3
>
> Using DIH can you create an index of the form
>
> id-treatment-id name
> 1a name1
> 1b name2
> 2b name2
> 2c name3
>
> In short can I splt the comma separated field and process each as an
> entity. From the docs and the wiki I can't see anything obvious.
>
> I feel I'm missing something easier here. (Note its not my data so can't do
> anything with the dodgy csv field )
>
--
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics
<http://www.griddynamics.com>
<mk...@griddynamics.com>
Re: DIH Problem: create multiple docs from a single entity
Posted by SolrLover <bb...@gmail.com>.
I suppose you can use Substring and Charindex to perform your task at SQL
level then use the value in another entity in DIH..
--
View this message in context: http://lucene.472066.n3.nabble.com/DIH-Problem-create-multiple-docs-from-a-single-entity-tp4083050p4083106.html
Sent from the Solr - User mailing list archive at Nabble.com.