lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Taboada <kaliman.fore...@gmail.com>
Subject Re: Data Import Handler fields with different values in column and name
Date Fri, 01 Jun 2012 16:01:57 GMT
Hi Jack.

Logging just show import is successful.

Jun 1, 2012 8:50:38 AM org.apache.solr.handler.dataimport.DocBuilder finish
INFO: Import completed successfully
Jun 1, 2012 8:50:38 AM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: start
commit(optimize=false,waitFlush=false,waitSearcher=true,expungeDeletes=false)
Jun 1, 2012 8:50:38 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/dataimport params={} status=0 QTime=0
Jun 1, 2012 8:50:38 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/dataimport params={} status=0 QTime=0
Jun 1, 2012 8:50:38 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/dataimport params={} status=0 QTime=0
Jun 1, 2012 8:50:38 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/dataimport params={} status=0 QTime=0
Jun 1, 2012 8:50:38 AM org.apache.solr.core.SolrDeletionPolicy onCommit
INFO: SolrDeletionPolicy.onCommit: commits:num=2
commit{dir=/home/rafael/solr/data/index,segFN=segments_1,version=1338565818575,generation=1,filenames=[segments_1]
commit{dir=/home/rafael/solr/data/index,segFN=segments_2,version=1338565818584,generation=2,filenames=[_0.tis,
_3.frq, _3.tii, _1.frq, _3.fnm, _3.fdt, _2.tii, _1.fnm, _1.tii, _0.prx,
_3.nrm, _0.nrm, _1.tis, _0.fnm, _2.prx, _2.fdt, _2.frq, _3.prx, _2.fdx,
_2.fnm, _3.fdx, _1.prx, _1.fdx, _2.tis, _0.tii, _1.fdt, _0.frq, segments_2,
_0.fdx, _0.fdt, _1.nrm, _2.nrm, _3.tis]
Jun 1, 2012 8:50:38 AM org.apache.solr.core.SolrDeletionPolicy updateCommits
INFO: newest commit = 1338565818584
Jun 1, 2012 8:50:38 AM org.apache.solr.search.SolrIndexSearcher <init>
INFO: Opening Searcher@c16c2c0 main
Jun 1, 2012 8:50:38 AM org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming Searcher@c16c2c0 main from Searcher@19fac852 main
fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
Jun 1, 2012 8:50:38 AM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: end_commit_flush
Jun 1, 2012 8:50:38 AM org.apache.solr.search.SolrIndexSearcher warm
INFO: autowarming result for Searcher@c16c2c0 main
fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
Jun 1, 2012 8:50:38 AM org.apache.solr.core.SolrCore registerSearcher
INFO: [] Registered new searcher Searcher@c16c2c0 main
Jun 1, 2012 8:50:38 AM org.apache.solr.search.SolrIndexSearcher close
INFO: Closing Searcher@19fac852 main
fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
Jun 1, 2012 8:50:38 AM
org.apache.solr.handler.dataimport.SimplePropertiesWriter
readIndexerProperties
INFO: Read dataimport.properties
Jun 1, 2012 8:50:38 AM
org.apache.solr.handler.dataimport.SimplePropertiesWriter persist
INFO: Wrote last indexed time to dataimport.properties
Jun 1, 2012 8:50:38 AM org.apache.solr.handler.dataimport.DocBuilder execute
INFO: Time taken = 0:0:14.677
Jun 1, 2012 8:50:38 AM org.apache.solr.update.processor.LogUpdateProcessor
finish
INFO: {deleteByQuery=*:*,add=[94, 96, 177, 178, 179, 1082, 181, 1089, ...
(425311 adds)],commit=} 0 30
Jun 1, 2012 8:50:39 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/dataimport params={} status=0 QTime=0
Jun 1, 2012 8:50:39 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/dataimport params={} status=0 QTime=0
Jun 1, 2012 8:50:39 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/dataimport params={} status=0 QTime=0
Jun 1, 2012 8:50:40 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/dataimport params={} status=0 QTime=0
Jun 1, 2012 8:50:48 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select/
params={indent=on&start=0&q=*:*&version=2.2&rows=10} hits=425311 status=0
QTime=26

But I was trying with mysql database and import is OK:

<dataConfig>
    <dataSource driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/solr" user="solr" password="solr" />
    <document>
        <entity name="usuario" query="select idusuario,nombres,apellidos
from usuario">
            <field column="idusuario" name="idusuario" />
            <field column="nombres" name="nombres1" />
            <field column="apellidos" name="apellidos1" />
        </entity>
    </document>
</dataConfig>

 <fields>
   <field name="idusuario" type="sint" indexed="true" stored="true"
required="true" />
   <field name="nombres1" type="string" indexed="true" stored="true" />
   <field name="apellidos1" type="string" indexed="true" stored="true"/>
 </fields>

Is there any issue with Oracle? I think this is not the problem... But I
will export my data to mysql to dismiss this supposition.

Thanks for your help


On Fri, Jun 1, 2012 at 10:34 AM, Jack Krupansky <jack@basetechnology.com>wrote:

> James: Is there some particular DIH logging he can turn on to see what is
> really happening with his field name mapping? In other words, if DIH/Solr
> really is ignoring that field mapping, to find out exactly why.
>
> -- Jack Krupansky
>
> -----Original Message----- From: Dyer, James
> Sent: Friday, June 01, 2012 10:50 AM
> To: solr-user@lucene.apache.org
> Subject: RE: Data Import Handler fields with different values in column
> and name
>
>
> Are you leaving both mappings in there, like this...
>
> <entity name="documento" query="SELECT iddocumento,nrodocumento,**asunto
> FROM documento">
> <field column="iddocumento" name="iddocumento" />
> <field column="nrodocumento" name="nrodocumento" />
> <field column="asunto" name="asunto" />
> <field column="asunto" name="anotherasunto" />
> </entity>
>
> If so, I'm not sure you can map "asunto" to two different fields like
> this. For that, you may need to write a transformer that will duplicate
> "asunto" for you.  Although, in most cases all you need to do is add a
> <copyField /> in schema.xml to copy "asunto" to "anotherasunto".  But a DIH
> Transformer would be helpful, for instance, if "asunto" is multi-valued but
> you only want to copy the first value to "anotherasunto" (perhaps you need
> to sort on it, which is not possible with multi-valued fields).
>
> If this doesn't help, let us know exactly why you need to duplicate
> "asunto" and maybe you can get more help from there.
>
> (If you're not trying to duplicate "asunto" and you're sure you've taken
> the duplicate out of data-config.xml, then go ahead and double-check
> spelling and case in all your config files.  Besides a typo somewhere, I'm
> not sure what else would cause this not to map.)
>
> James Dyer
> E-Commerce Systems
> Ingram Content Group
> (615) 213-4311
>
>
> -----Original Message-----
> From: Rafael Taboada [mailto:kaliman.forever@gmail.**com<kaliman.forever@gmail.com>
> ]
> Sent: Thursday, May 31, 2012 4:13 PM
> To: solr-user@lucene.apache.org
> Subject: Fwd: Data Import Handler fields with different values in column
> and name
>
> Please,
>
> Can anyone guide me through this issue? Thanks
>
>
>
> ---------- Forwarded message ----------
> From: Rafael Taboada <kaliman.forever@gmail.com>
> Date: Thu, May 31, 2012 at 12:30 PM
> Subject: Data Import Handler fields with different values in column and
> name
> To: solr-user@lucene.apache.org
>
>
> Hi folks,
>
> I'm using Solr 3.6 and I'm trying to import data from my database to solr
> using Data Import Handler. My db-config is like this:
>
> <dataConfig>
>  <dataSource driver="oracle.jdbc.**OracleDriver"
> url="jdbc:oracle:thin:@**localhost:1521:XE" user="admin" password="admin"
> />
>  <document>
>     <entity name="documento" query="SELECT
> iddocumento,nrodocumento,**asunto FROM documento">
>        <field column="iddocumento" name="iddocumento" />
>        <field column="nrodocumento" name="nrodocumento" />
>        <field column="asunto" name="asunto" />
>     </entity>
>  </document>
> </dataConfig>
>
> My problem is when I'm trying to use a different values in the field tag,
> for example
>
>        <field column="asunto" name="anotherasunto" />
>
> When I use different name from column, this field is omitted. Please can
> you help me with this issue?
>
> My schema.xml is:
>
> <types>
>     <fieldtype name="string" class="solr.StrField" sortMissingLast="true"
> />
>  </types>
>
>  <fields>
>     <!-- general -->
>     <field name="iddocumento" type="string" indexed="true" stored="true"
> required="true" />
>     <field name="nrodocumento" type="string" indexed="true" stored="true"
> />
>     <field name="anotherasunto" type="string" indexed="true"
> stored="true" />
>  </fields>
>
> Thanks in advance!
>
> --
> Rafael Taboada
>
>
>
>
>
>
> --
> Rafael Taboada
>
> /*
> * Phone >> 992 741 026
> */
>



-- 
Rafael Taboada

/*
 * Phone >> 992 741 026
 */

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message