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 lun zhong <zh...@gmail.com> on 2010/12/23 09:44:25 UTC
help: DIH and Multivalue does not work
Hi, Solr gurus:
I am totally new to solr and hope somebody can help me on this.
I have multivalue field "channel" in my schema:
<field name="channel" type="string" indexed="true" stored="true"
multivalue="true"/>
and the DIH config:
<entity name="autocomplete" query="select * from view_autocomplete"
transformer="RegexTransformer">
<field column="channel" sourceColcolumn="channels" splitBy=","/>
</entity>
the DIH full-import is Ok with other fields, but channel has nothing (solr
query: q=*:*).
If i remove <field column="channel" sourceColcolumn="channels" splitBy=","/>
or make my db returns "channel" column, channel would have the correct data,
i.e. "a,b,c" but problem is "a,b,c" is no more multivalue but single value.
I am using postgresql 9 and the sql is pretty simple: select ...,
'a,b,c'::text AS channels from table-xxx; I did try out solr 1.4.1 and 3.1
snapshot from svn, both having the same problem.
Thanks.
Re: help: DIH and Multivalue does not work
Posted by lun zhong <zh...@gmail.com>.
Yup, it is working, thanks so much.
On Thu, Dec 23, 2010 at 4:55 PM, Ahmet Arslan <io...@yahoo.com> wrote:
> There are several typos,
>
> multiValued="true" => multivalue
> sourceColName => sourceColcolumn
>
> By the way, after you correct those and restart tomcat, you can debug on
> /admin/dataimport.jsp
>
>
> --- On Thu, 12/23/10, lun zhong <zh...@gmail.com> wrote:
>
> > From: lun zhong <zh...@gmail.com>
> > Subject: help: DIH and Multivalue does not work
> > To: solr-user@lucene.apache.org
> > Date: Thursday, December 23, 2010, 10:44 AM
> > Hi, Solr gurus:
> >
> > I am totally new to solr and hope somebody can help me on
> > this.
> >
> > I have multivalue field "channel" in my schema:
> >
> > <field name="channel" type="string" indexed="true"
> > stored="true"
> > multivalue="true"/>
> >
> > and the DIH config:
> >
> > <entity name="autocomplete" query="select * from
> > view_autocomplete"
> > transformer="RegexTransformer">
> > <field
> > column="channel" sourceColcolumn="channels"
> > splitBy=","/>
> > </entity>
> >
> > the DIH full-import is Ok with other fields, but channel
> > has nothing (solr
> > query: q=*:*).
> >
> > If i remove <field column="channel"
> > sourceColcolumn="channels" splitBy=","/>
> > or make my db returns "channel" column, channel would have
> > the correct data,
> > i.e. "a,b,c" but problem is "a,b,c" is no more multivalue
> > but single value.
> >
> > I am using postgresql 9 and the sql is pretty simple:
> > select ...,
> > 'a,b,c'::text AS channels from table-xxx; I did try out
> > solr 1.4.1 and 3.1
> > snapshot from svn, both having the same problem.
> >
> > Thanks.
> >
>
>
>
>
Re: help: DIH and Multivalue does not work
Posted by Ahmet Arslan <io...@yahoo.com>.
There are several typos,
multiValued="true" => multivalue
sourceColName => sourceColcolumn
By the way, after you correct those and restart tomcat, you can debug on /admin/dataimport.jsp
--- On Thu, 12/23/10, lun zhong <zh...@gmail.com> wrote:
> From: lun zhong <zh...@gmail.com>
> Subject: help: DIH and Multivalue does not work
> To: solr-user@lucene.apache.org
> Date: Thursday, December 23, 2010, 10:44 AM
> Hi, Solr gurus:
>
> I am totally new to solr and hope somebody can help me on
> this.
>
> I have multivalue field "channel" in my schema:
>
> <field name="channel" type="string" indexed="true"
> stored="true"
> multivalue="true"/>
>
> and the DIH config:
>
> <entity name="autocomplete" query="select * from
> view_autocomplete"
> transformer="RegexTransformer">
> <field
> column="channel" sourceColcolumn="channels"
> splitBy=","/>
> </entity>
>
> the DIH full-import is Ok with other fields, but channel
> has nothing (solr
> query: q=*:*).
>
> If i remove <field column="channel"
> sourceColcolumn="channels" splitBy=","/>
> or make my db returns "channel" column, channel would have
> the correct data,
> i.e. "a,b,c" but problem is "a,b,c" is no more multivalue
> but single value.
>
> I am using postgresql 9 and the sql is pretty simple:
> select ...,
> 'a,b,c'::text AS channels from table-xxx; I did try out
> solr 1.4.1 and 3.1
> snapshot from svn, both having the same problem.
>
> Thanks.
>