Re: Modify data-conf.xml on the runtime

2018-04-25 Thread Shawn Heisey

On 4/25/2018 4:12 AM, rameshkjes wrote:

Actually I am trying to approach this problem from another way.
I am taking user input from gui which is direcotory of dataset, and saving
that path in properties file. Since I am using Maven, so I am able to access
that path in my pom file using properties tag. So, now is it possible to use
that properties variable from pom.xml to the data-conf.xml? do you think, it
is right way?


Maven is used to build a program from source.  Maven is not involved 
when running Solr unless you're doing something non-standard.  It's 
difficult for this list to support a non-standard setup.


What are you trying to do?  Perhaps there is a way to do it that doesn't 
involve using unexpected tools.


If you must use Maven, you may be on your own in trying to get it to 
work with Solr.  I have never heard of such an integration before except 
at build time.  The maven build for Lucene/Solr is not the standard 
build tool.  The standard build uses ant.


Thanks,
Shawn



Re: Modify data-conf.xml on the runtime

2018-04-25 Thread rameshkjes
Actually I am trying to approach this problem from another way. 
I am taking user input from gui which is direcotory of dataset, and saving
that path in properties file. Since I am using Maven, so I am able to access
that path in my pom file using properties tag. So, now is it possible to use
that properties variable from pom.xml to the data-conf.xml? do you think, it
is right way? 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Modify data-conf.xml on the runtime

2018-04-13 Thread Shawn Heisey

On 4/13/2018 2:54 AM, rameshkjes wrote:

I am using datasource as "FileDataSource", how can i grab that information
from url?


I'm pretty sure that you can provide pretty much ANY information in the 
DIH config file from a URL parameter, using the ${dih.request.} syntax.


To answer your other question you sent in a different message: With the 
standard syntax, imports are going to fail if you don't supply all the 
parameters.  I think you can specify a default value in that syntax like 
this, which will get used if the property isn't defined:


${dih.request.:defaultValue}

Thanks,
Shawn



Re: Modify data-conf.xml on the runtime

2018-04-13 Thread rameshkjes
I am using datasource as "FileDataSource", how can i grab that information
from url?  



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Modify data-conf.xml on the runtime

2018-04-13 Thread rameshkjes
How data will be imported using dih, if path of data is not provided? What I
want is to provide the link of dataset files during runtime. 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Modify data-conf.xml on the runtime

2018-04-11 Thread Shawn Heisey
On 4/11/2018 9:21 AM, rameshkjes wrote:
> I am doing configuration of solr with the xml and pdf dataset, it works
> perfect. But, I want to modify few things: 
> Such as, we can see below, "baseDir" and "filePrefix" is being defined
> manually. I want this to be defined on the runtime.

The way I would do this is to have DIH grab that information from URL
parameters on the request to start the import.

So your URL would look like this:

?command=full-import=somePath=someOtherPath

And your config would look like this:


  

Re: Modify data-conf.xml on the runtime

2018-04-11 Thread Alexandre Rafalovitch
I believe you can use variable substitution like
${dih.request.paramname} and then pass 'paramname=value' in your HTTP
request.

Regards,
   Alex.

On 11 April 2018 at 11:25, rameshkjes  wrote:
> Hi,
>
> I am doing configuration of solr with the xml and pdf dataset, it works
> perfect. But, I want to modify few things:
> Such as, we can see below, "baseDir" and "filePrefix" is being defined
> manually. I want this to be defined on the runtime. Consider that I have GUI
> and user is specifying the directories for datasets. So, I have separate
> java file that does this job. But, I don't know how to use data of that
> class to configure "baseDir" and "filePrefix". Could anyone help me that how
> can i access that data from java class and fill in the data-conf.xml.
>
> These are few fields of my data-conf.xml file.
>
>  
> baseDir="C:/Users/kuma_rm/github/ML/dataset/XmlMetaData/"
> fileName=".*xml" rootEntity="false" datasource="null"
> 
> transformer="pathos.utils.transformer.FilePathTransformer">
>
>
>  filePrefix="C:/Users/kuma_rm/github/ML/dataset/PdfMetaData/"
> fileSuffix=".pdf" oldFileSuffix=".xml" srcColName="file"/>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Modify data-conf.xml on the runtime

2018-04-11 Thread rameshkjes
Hi, 

I am doing configuration of solr with the xml and pdf dataset, it works
perfect. But, I want to modify few things: 
Such as, we can see below, "baseDir" and "filePrefix" is being defined
manually. I want this to be defined on the runtime. Consider that I have GUI
and user is specifying the directories for datasets. So, I have separate
java file that does this job. But, I don't know how to use data of that
class to configure "baseDir" and "filePrefix". Could anyone help me that how
can i access that data from java class and fill in the data-conf.xml.

These are few fields of my data-conf.xml file. 

 

 
 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Modify data-conf.xml on the runtime

2018-04-11 Thread rameshkjes
Hi, 

I am doing configuration of solr with the xml and pdf dataset, it works
perfect. But, I want to modify few things: 
Such as, we can see below, "baseDir" and "filePrefix" is being defined
manually. I want this to be defined on the runtime. Consider that I have GUI
and user is specifying the directories for datasets. So, I have separate
java file that does this job. But, I don't know how to use data of that
class to configure "baseDir" and "filePrefix". Could anyone help me that how
can i access that data from java class and fill in the data-conf.xml.

These are few fields of my data-conf.xml file. 

 

 
 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html