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 Pandey Brahmdev <pa...@gmail.com> on 2017/06/21 22:52:19 UTC

Solr Search Problem with Multiple Data-Import Handler

Hi,
I have setup Apache Solr 6.6.0 on Windows 10, 64-bit.

I have created a simple core & configured DataImport Handlers.
I have configured 2 dataImport handlers in the Solr-config.xml file.

First for to connect to DB & have data from DB Tables.
And Second for to have data from all pdf files using TikaEntityProcessor.

Now the problem is there is no error in the console or anywhere but
whenever I want to search using "Query" tab it gives me the result of Data
Import.

So let's say if I last Imported data for Tables then it gives me to result
from the table and if I imported PDF Files then it searches inside PDF
Files.

But now when I again want to search for DB Tables values then It doesn't
give me the result instead I again need to Import Data for
DataImportHandler for File & vice-versa.

Can you please help me out here?
Very sorry if I am doing anything wrong as I have started using Apache Solr
only 2 days back.

Thanks & Regards,
Brahmdev Pandey
+46 767086309

Re: Solr Search Problem with Multiple Data-Import Handler

Posted by Josh Lincoln <jo...@gmail.com>.
I suspect Erik's right that clean=true is the problem. That's the default
in the DIH interface.


I find that when using DIH, it's best to set preImportDeleteQuery for every
entity. This safely scopes the clean variable to just that entity.
It doesn't look like the docs have examples of using preImportDeleteQuery,
so I put one here:

<entity name="comment" dataSource="db"
transformer="TemplateTransformer,DateFormatTransformer" pk="COMMENT_ID"
                preImportDeleteQuery="doc_type:comment"


</entity>


On Wed, Jun 21, 2017 at 7:48 PM Erick Erickson <er...@gmail.com>
wrote:

> First place I'd look is whether the jobs have clean=true set. If so the
> first thing DIH does is delete all documents.
>
> Best,
> Erick
>
> On Wed, Jun 21, 2017 at 3:52 PM, Pandey Brahmdev <pa...@gmail.com>
> wrote:
>
> > Hi,
> > I have setup Apache Solr 6.6.0 on Windows 10, 64-bit.
> >
> > I have created a simple core & configured DataImport Handlers.
> > I have configured 2 dataImport handlers in the Solr-config.xml file.
> >
> > First for to connect to DB & have data from DB Tables.
> > And Second for to have data from all pdf files using TikaEntityProcessor.
> >
> > Now the problem is there is no error in the console or anywhere but
> > whenever I want to search using "Query" tab it gives me the result of
> Data
> > Import.
> >
> > So let's say if I last Imported data for Tables then it gives me to
> result
> > from the table and if I imported PDF Files then it searches inside PDF
> > Files.
> >
> > But now when I again want to search for DB Tables values then It doesn't
> > give me the result instead I again need to Import Data for
> > DataImportHandler for File & vice-versa.
> >
> > Can you please help me out here?
> > Very sorry if I am doing anything wrong as I have started using Apache
> Solr
> > only 2 days back.
> >
> > Thanks & Regards,
> > Brahmdev Pandey
> > +46 767086309 <+46%2076%20708%2063%2009>
> >
>

Re: Solr Search Problem with Multiple Data-Import Handler

Posted by Erick Erickson <er...@gmail.com>.
First place I'd look is whether the jobs have clean=true set. If so the
first thing DIH does is delete all documents.

Best,
Erick

On Wed, Jun 21, 2017 at 3:52 PM, Pandey Brahmdev <pa...@gmail.com>
wrote:

> Hi,
> I have setup Apache Solr 6.6.0 on Windows 10, 64-bit.
>
> I have created a simple core & configured DataImport Handlers.
> I have configured 2 dataImport handlers in the Solr-config.xml file.
>
> First for to connect to DB & have data from DB Tables.
> And Second for to have data from all pdf files using TikaEntityProcessor.
>
> Now the problem is there is no error in the console or anywhere but
> whenever I want to search using "Query" tab it gives me the result of Data
> Import.
>
> So let's say if I last Imported data for Tables then it gives me to result
> from the table and if I imported PDF Files then it searches inside PDF
> Files.
>
> But now when I again want to search for DB Tables values then It doesn't
> give me the result instead I again need to Import Data for
> DataImportHandler for File & vice-versa.
>
> Can you please help me out here?
> Very sorry if I am doing anything wrong as I have started using Apache Solr
> only 2 days back.
>
> Thanks & Regards,
> Brahmdev Pandey
> +46 767086309
>