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 deniz <de...@gmail.com> on 2011/05/17 07:59:31 UTC

how to use variable in solfconfig.xml?

 <requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
	    <str name="config">db-config.xml</str>
      <lst name="datasource">
         <str name="name">database</str>
         <str name="type">JdbcDataSource</str>
         <str name="driver">com.mysql.jdbc.Driver</str>
         <str name="url">jdbc:mysql://xxx/xxxxx</str>
         <str name="user">xxx</str>
         <str name="password">xxx</str>
      </lst>
      <lst name="datasource">
         <str name="name">url_data</str>
         <str name="type">URLDataSource</str>
         <str
name="url">http://xxx.xxx.xxx/frontend_dev.php/x/xxxx/${var}</str>
         <str name="processor">XPathEntityProcessor</str>
      </lst>
    </lst>
  </requestHandler>





is this possible?

-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/how-to-use-variable-in-solfconfig-xml-tp2951337p2951337.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: how to use variable in solfconfig.xml?

Posted by Paul Libbrecht <pa...@hoplahup.net>.
that tastes like two different requester processors.

paul


Le 17 mai 2011 à 08:31, deniz a écrit :

> well the things that i wanna do is something like this:
> 
> lets say we got two users, ids are 1 and 2. and the links xxxx/1 returns
> user1's data in xml format and xxxx/2 returns user2's data again in xml
> format and I want to use the resulting xmls for indexing...
> 
> or is it better to have only one page like xxxx/users and return user1 and
> user2 on the same page?
> 
> 
> I will check for solr-packager too... 
> thank you
> 
> deniz
> 
> -----
> Zeki ama calismiyor... Calissa yapar...
> --
> View this message in context: http://lucene.472066.n3.nabble.com/how-to-use-variable-in-solfconfig-xml-tp2951337p2951395.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to use variable in solfconfig.xml?

Posted by deniz <de...@gmail.com>.
well the things that i wanna do is something like this:

lets say we got two users, ids are 1 and 2. and the links xxxx/1 returns
user1's data in xml format and xxxx/2 returns user2's data again in xml
format and I want to use the resulting xmls for indexing...

or is it better to have only one page like xxxx/users and return user1 and
user2 on the same page?


I will check for solr-packager too... 
thank you

deniz

-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/how-to-use-variable-in-solfconfig-xml-tp2951337p2951395.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: how to use variable in solfconfig.xml?

Posted by Paul Libbrecht <pa...@hoplahup.net>.
Deniz,

you want xxxx to be parametrizable?
I use solr-packager to do that. And it works well.
The solrconfig and schema are all processed through the filter-resources maven process.

paul


Le 17 mai 2011 à 07:59, deniz a écrit :

> <requestHandler name="/dataimport"
> class="org.apache.solr.handler.dataimport.DataImportHandler">
>    <lst name="defaults">
> 	    <str name="config">db-config.xml</str>
>      <lst name="datasource">
>         <str name="name">database</str>
>         <str name="type">JdbcDataSource</str>
>         <str name="driver">com.mysql.jdbc.Driver</str>
>         <str name="url">jdbc:mysql://xxx/xxxxx</str>
>         <str name="user">xxx</str>
>         <str name="password">xxx</str>
>      </lst>
>      <lst name="datasource">
>         <str name="name">url_data</str>
>         <str name="type">URLDataSource</str>
>         <str
> name="url">http://xxx.xxx.xxx/frontend_dev.php/x/xxxx/${var}</str>
>         <str name="processor">XPathEntityProcessor</str>
>      </lst>
>    </lst>
>  </requestHandler>
> 
> 
> 
> 
> 
> is this possible?
> 
> -----
> Zeki ama calismiyor... Calissa yapar...
> --
> View this message in context: http://lucene.472066.n3.nabble.com/how-to-use-variable-in-solfconfig-xml-tp2951337p2951337.html
> Sent from the Solr - User mailing list archive at Nabble.com.