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 LongY <zh...@hotmail.com> on 2014/10/18 07:36:29 UTC

import data into solr from velocity (aka Solritas)

hello everyone, 

I did lots of search, and did not find a proper way to solve this problem,
and 
it brings me to here ask for help. 

I am trying to import data from velocity into solr. I defined a new link
which 
is localhost:8983/solr/collection1/browse/importdata. This webpage is used
to 
collect the data imported. However, it seems the velocity is only able to
define 
only one main template, in other words, I am not able to add one more
webpage 
in this velocity UI. 

I also checked DIH (data import handler), it seems it only works with
relational databases or XML files. 

My question is: how can I import data from velocity UI. 

Any input is welcome.



--
View this message in context: http://lucene.472066.n3.nabble.com/import-data-into-solr-from-velocity-aka-Solritas-tp4164751.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: import data into solr from velocity (aka Solritas)

Posted by LongY <zh...@hotmail.com>.
Thanks for pointing this out.

The web server I developed is only for internal use, and users are
trustworthy.

Yes, I agree with you. Velocity/Solaritas is never intended to be a
user-facing app.
It need a middleware layer if user is public.









--
View this message in context: http://lucene.472066.n3.nabble.com/import-data-into-solr-from-velocity-aka-Solritas-tp4164751p4164787.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: import data into solr from velocity (aka Solritas)

Posted by Shawn Heisey <ap...@elyograg.org>.
On 10/18/2014 8:15 AM, LongY wrote:
> I still used the same /browse request handler in the example.
> 
> My goal is to create a webform UI to collect user input to be further
> indexed.
> My thoughts is adding a new webpage to the existing user interface, the link
> is
> localhost:8983/solr/collection1/browse/. I added a new link which is
> localhost:8983/solr/collection1/browse/importdata.
> 
> The problem is: how to add a new webform in the existing velocity response
> writer.
> Velocity seems allow only one html layout file.

I have no wish to disparage whoever built the /browse handler and/or
whoever maintains it, even though it might seem like it with what I'm
going to say below.  I've only glanced at the code, but it does not look
like a trivial work.  It serves as an excellent example for Solr's
capabilities, so it's really nice to have.

If the code you are developing is intended to face the public, you do
not want to use the /browse handler, and you do not want to utilize a
javascript solr client.

The reason is simple:  These things require that the end user has direct
access to your Solr server.

If someone has direct access to your Solr server, it's wide open to
them.  They can change the index, delete the index, send crafted denial
of service queries, etc.  It's possible to put Solr behind an
intelligent proxy that can detect these attempts and deny them, but
configuring such a proxy is not an easy task.

There's a special caveat for what you're trying to do:  It would require
leaving the indexing handler open, even through a proxy, so you'd have
no protection against users changing your index to include whatever they
want.

If the audience for what you are writing is completely trustworthy and
internal, and the web server will not face the Internet, then you can
set it up any way you like without worry, use any technology you want.

Thanks,
Shawn


Re: import data into solr from velocity (aka Solritas)

Posted by LongY <zh...@hotmail.com>.
Thanks a lot. Eric.

I still used the same /browse request handler in the example.

My goal is to create a webform UI to collect user input to be further
indexed.
My thoughts is adding a new webpage to the existing user interface, the link
is
localhost:8983/solr/collection1/browse/. I added a new link which is
localhost:8983/solr/collection1/browse/importdata.

The problem is: how to add a new webform in the existing velocity response
writer.
Velocity seems allow only one html layout file.

Regarding DIH, it seems does not have this functionality. It is not able to
collect the user input
from a webpage, like a webform.





--
View this message in context: http://lucene.472066.n3.nabble.com/import-data-into-solr-from-velocity-aka-Solritas-tp4164751p4164784.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: import data into solr from velocity (aka Solritas)

Posted by Erik Hatcher <er...@gmail.com>.
Could you elaborate more on what you're trying to do?   You've defined a new request handler?   You can use any template you want with the Velocity writer - v.template=template_name

As for DIH - it can do a lot, database, XML, email, another Solr, etc. 

What kind of "import" are you trying to accomplish?

   Erik


> On Oct 18, 2014, at 01:36, LongY <zh...@hotmail.com> wrote:
> 
> hello everyone, 
> 
> I did lots of search, and did not find a proper way to solve this problem,
> and 
> it brings me to here ask for help. 
> 
> I am trying to import data from velocity into solr. I defined a new link
> which 
> is localhost:8983/solr/collection1/browse/importdata. This webpage is used
> to 
> collect the data imported. However, it seems the velocity is only able to
> define 
> only one main template, in other words, I am not able to add one more
> webpage 
> in this velocity UI. 
> 
> I also checked DIH (data import handler), it seems it only works with
> relational databases or XML files. 
> 
> My question is: how can I import data from velocity UI. 
> 
> Any input is welcome.
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/import-data-into-solr-from-velocity-aka-Solritas-tp4164751.html
> Sent from the Solr - User mailing list archive at Nabble.com.