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 Adam Blank <ad...@gmail.com> on 2018/08/20 17:45:32 UTC

Data Import from Command Line

Hi,

I'm running Solr 5.5.0 on AIX, and I'm wondering if there's a way to import
the index from the command line instead of using the admin console?  I
don't have the ability to use a HTTP client such as cURL to connect to the
console.

Thank you,
Adam

Re: Data Import from Command Line

Posted by Adam Blank <ad...@gmail.com>.
Thank you both for the responses. I was able to get the import working
through telnet, and I'll see if I can get the post utility working as that
seems like a better option.

Thanks,
Adam

On Mon, Aug 20, 2018, 2:04 PM Alexandre Rafalovitch <ar...@gmail.com>
wrote:

> Admin UI just hits Solr for a particular URL with specific parameters.
> You could totally call it from the command line, but it _would_ need
> to be an HTTP client of some sort. You could encode all of the
> parameters into the DIH (or a new) handler, it is all defined in
> solrconfig.xml (/dataimport is the default one).
>
> If you don't have curl, maybe you have wget? Or lynx? Or, just for
> giggles, you could Telnet into port 80 and manually type the required
> command (
> http://blog.tonycode.com/tech-stuff/http-notes/making-http-requests-via-telnet/
> ):
> GET /dataimport?param=value HTTP/1.0
>
> Regards,
>    Alex.
> P.s. And yes, maybe bin/post could be used as well. Or the previous
> direct java invocation of the posttool jar. May need to massage the
> parameters a bit though.
>
> On 20 August 2018 at 13:45, Adam Blank <ad...@gmail.com> wrote:
> > Hi,
> >
> > I'm running Solr 5.5.0 on AIX, and I'm wondering if there's a way to
> import
> > the index from the command line instead of using the admin console?  I
> > don't have the ability to use a HTTP client such as cURL to connect to
> the
> > console.
> >
> > Thank you,
> > Adam
>

Re: Data Import from Command Line

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Admin UI just hits Solr for a particular URL with specific parameters.
You could totally call it from the command line, but it _would_ need
to be an HTTP client of some sort. You could encode all of the
parameters into the DIH (or a new) handler, it is all defined in
solrconfig.xml (/dataimport is the default one).

If you don't have curl, maybe you have wget? Or lynx? Or, just for
giggles, you could Telnet into port 80 and manually type the required
command (http://blog.tonycode.com/tech-stuff/http-notes/making-http-requests-via-telnet/):
GET /dataimport?param=value HTTP/1.0

Regards,
   Alex.
P.s. And yes, maybe bin/post could be used as well. Or the previous
direct java invocation of the posttool jar. May need to massage the
parameters a bit though.

On 20 August 2018 at 13:45, Adam Blank <ad...@gmail.com> wrote:
> Hi,
>
> I'm running Solr 5.5.0 on AIX, and I'm wondering if there's a way to import
> the index from the command line instead of using the admin console?  I
> don't have the ability to use a HTTP client such as cURL to connect to the
> console.
>
> Thank you,
> Adam

Re: Data Import from Command Line

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Adam,

On 8/20/18 1:45 PM, Adam Blank wrote:
> I'm running Solr 5.5.0 on AIX, and I'm wondering if there's a way
> to import the index from the command line instead of using the
> admin console?  I don't have the ability to use a HTTP client such
> as cURL to connect to the console.

I'm not sure when it was added, but there is a program called "post"
which comes with later versions of Solr that can be used to load data
into an index.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlt7AfcACgkQHPApP6U8
pFgtgw/7BTV7shvNcXKrpTB11g0wjYXAJOlqARlYgWFcQIhVcs1jfbJi8O6Yxh0x
BIA/EAdob9zC/EgYbMfkM/duibr2A1/wF+CkhhTd6M/HcoSOXbI31L1LDo/xa0lg
z6t3AO9WYYKnFmD2JIxdidH1zHpIz74cAc3q43PFVtLNW2fVT2cNlg7Vn6vdVmoi
79VLPnvdyxZRdQtxbhdvCribPdFP6YLC3dgxh1KeeZzdO0OcjQykSrssX/hd207z
9iuw2TusoUIgXQsMLRtnKqqVp38MYPppk49uGprhB8iTJjDAVlvgD3jURef7S7s/
w1KBPVZTGQFh6cvzjOOZHUkaj0hX4PuYkun/hQY3Uy5kBIw5fo0Y10bjVcRZGYrb
SQDTUe0sdfU27qaY8DLqSf21to5K+wTIuOO28C1TkHkjKymg0w7THz583o0aOCzr
5fjNN00FevrWFLm+n7c2tToW3H1cAZkh5XRDDDUYnqzVzchSOHlFKM1X0gMOq8Lf
If434uctruwsqBrkscTWcS5UALGLxuwtNk9trLLeRII8YapB6MI6xoUnCvWFv1sO
fziqKXXwBmrI+v/1FqiR8Md3r32jm8Gy54acViJc9+szUEM26C+FSzvsdGnf5oVr
tlsHVwLBPORS6hGJ+MvqMGkrxlO1WNm5MrJxHNoyQ5KqAL7WT+s=
=+VTK
-----END PGP SIGNATURE-----