Hmmm, not sure and unfortunately won't be able to look very closely.
Do the Solr logs say anything more informative?

Also, the admin UI>>select core>>documents lets you submit docs
interactively to Solr, that's also worth a try I should think.

Best,
Erick

On Wed, Mar 30, 2016 at 3:15 PM, Aditya Desai <adity...@usc.edu> wrote:
> Hi Erick
>
> Thanks for your email. Here is the attached sample JSON file. When I indexed
> the same JSON file with SOLR 5.5 using bin/post it indexed successfully.
> Also all of my documents were indexed successfully with 5.5 and not with
> 4.10.
>
> Regards
>
> On Wed, Mar 30, 2016 at 3:13 PM, Erick Erickson <erickerick...@gmail.com>
> wrote:
>>
>> The document you're sending to Solr doesn't have an "id" field. The
>> copyField directive has
>> nothing to do with it. And you copyField would be copying _from_ the
>> id field _to_ the
>> Keyword field, is that what you intended?
>>
>> Even if the source and dest fields were reversed, it still wouldn't
>> work since there is no id
>> field as indicated by the error.
>>
>> Let's see one of the json files please? Are they carefully-formulated
>> or arbitrary files? If
>> carefully formulated, just switch
>>
>> Best,
>> Erick
>>
>> On Wed, Mar 30, 2016 at 11:26 AM, Aditya Desai <adity...@usc.edu> wrote:
>> > Hi Paul
>> >
>> > Thanks a lot for your help! I have one small question, I have schema
>> > that
>> > includes {Keyword,id,currency,geographic_name}. Now I have given
>> > <uniqueKey>id</uniqueKey>
>> > And
>> > <copyField source="id" dest="Keyword"/>
>> > Whenever I am running your script I am getting an error as
>> >
>> > <response>
>> > <lst name="responseHeader"><int name="status">400</int><int
>> > name="QTime">2</int></lst><lst name="error"><str name="msg">Document is
>> > missing mandatory uniqueKey field: id</str><int
>> > name="code">400</int></lst>
>> > </response>
>> >
>> > Can you please share your expertise advice here. Can you please guide me
>> > a
>> > good source to learn SOLR?
>> >
>> > I am learning and I would really appreciate if you can help me.
>> >
>> > Regards
>> >
>> >
>> > On Wed, Mar 30, 2016 at 6:55 AM, Paul Hoffman <p...@flo.org> wrote:
>> >
>> >> On Tue, Mar 29, 2016 at 11:30:06PM -0700, Aditya Desai wrote:
>> >> > I am running SOLR 4.10 on port 8984 by changing the default port in
>> >> > etc/jetty.xml. I am now trying to index all my JSON files to Solr
>> >> > running
>> >> > on 8984. The following is the command
>> >> >
>> >> > curl '
>> >>
>> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8984_solr_update-3Fcommit-3Dtrue&d=CwIBAg&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=aLfk1zsmx4LG4nTElFRiaw&m=7B13rM0e1iuqzbXK9vK6b5luu5je3SpeGunT1bf-MWA&s=R9qSptMrt9o6C0BXmeQdtm3_bx4fFbABYFja2XUFylA&e=
>> >> ' --data-binary *.json
>> >> > -H 'Content-type:application/json'
>> >>
>> >> The wildcard is the problem; your shell is expanding --data-binary
>> >> *.json to --data-binary foo.json bar.json baz.json and curl doesn't
>> >> know
>> >> how to download bar.json and baz.json.
>> >>
>> >> Try this instead:
>> >>
>> >> for file in *.json; do
>> >>     curl '
>> >>
>> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8984_solr_update-3Fcommit-3Dtrue&d=CwIBAg&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=aLfk1zsmx4LG4nTElFRiaw&m=7B13rM0e1iuqzbXK9vK6b5luu5je3SpeGunT1bf-MWA&s=R9qSptMrt9o6C0BXmeQdtm3_bx4fFbABYFja2XUFylA&e=
>> >> ' --data-binary "$file" -H 'Content-type:application/json'
>> >> done
>> >>
>> >> Paul.
>> >>
>> >> --
>> >> Paul Hoffman <p...@flo.org>
>> >> Systems Librarian
>> >> Fenway Libraries Online
>> >> c/o Wentworth Institute of Technology
>> >> 550 Huntington Ave.
>> >> Boston, MA 02115
>> >> (617) 442-2384 (FLO main number)
>> >>
>> >
>> >
>> >
>> > --
>> > Aditya Ramachandra Desai
>> > MS Computer Science Graduate Student
>> > USC Viterbi School of Engineering
>> > Los Angeles, CA 90007
>> > M : +1-415-463-9864 | L :
>> > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.linkedin.com_in_adityardesai&d=CwIFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=aLfk1zsmx4LG4nTElFRiaw&m=ihbpCZYoNmoSqzckKlY5lkESOZXPuLtNIGjnLZCzj78&s=YD-dm-5blmQ07_4vYFoLz6r0NqKRNK1aHtIgHUvc48U&e=
>
>
>
>
> --
> Aditya Ramachandra Desai
> MS Computer Science Graduate Student
> USC Viterbi School of Engineering
> Los Angeles, CA 90007
> M : +1-415-463-9864 | L : https://www.linkedin.com/in/adityardesai
>

Reply via email to